From dfc94207fec2d84314b1a5410cface22e8b369bd Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 Apr 2023 11:43:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-11-stable-ee --- db/docs/abuse_trust_scores.yml | 10 + db/docs/agent_activity_events.yml | 2 +- db/docs/agent_group_authorizations.yml | 4 +- db/docs/agent_project_authorizations.yml | 4 +- db/docs/agent_user_access_group_authorizations.yml | 10 + .../agent_user_access_project_authorizations.yml | 10 + db/docs/appearances.yml | 2 +- db/docs/approval_project_rules_users.yml | 3 +- ..._instance_external_audit_event_destinations.yml | 10 + db/docs/aws_roles.yml | 2 +- ...admin_mode_scope_for_personal_access_tokens.yml | 6 + .../backfill_project_wiki_repositories.yml | 8 + ...ate_code_suggestions_for_namespace_settings.yml | 6 + db/docs/broadcast_messages.yml | 2 +- db/docs/ci_group_variables.yml | 2 +- db/docs/ci_instance_variables.yml | 2 +- db/docs/ci_job_variables.yml | 2 +- db/docs/ci_namespace_mirrors.yml | 2 +- db/docs/ci_pipeline_variables.yml | 2 +- db/docs/ci_project_mirrors.yml | 2 +- db/docs/ci_runner_machines.yml | 4 +- db/docs/ci_secure_file_states.yml | 2 +- db/docs/ci_secure_files.yml | 2 +- db/docs/ci_variables.yml | 2 +- db/docs/cluster_agent_tokens.yml | 2 +- db/docs/cluster_agents.yml | 2 +- db/docs/cluster_enabled_grants.yml | 2 +- db/docs/cluster_groups.yml | 2 +- db/docs/cluster_platforms_kubernetes.yml | 2 +- db/docs/cluster_projects.yml | 2 +- db/docs/cluster_providers_aws.yml | 2 +- db/docs/cluster_providers_gcp.yml | 2 +- db/docs/clusters.yml | 2 +- db/docs/clusters_applications_cert_managers.yml | 2 +- db/docs/clusters_applications_crossplane.yml | 2 +- db/docs/clusters_applications_helm.yml | 4 +- db/docs/clusters_applications_ingress.yml | 4 +- db/docs/clusters_applications_jupyter.yml | 4 +- db/docs/clusters_applications_knative.yml | 4 +- db/docs/clusters_applications_prometheus.yml | 2 +- db/docs/clusters_applications_runners.yml | 4 +- db/docs/clusters_kubernetes_namespaces.yml | 2 +- db/docs/deleted_tables/packages_events.yml | 12 + db/docs/deployment_clusters.yml | 2 +- db/docs/design_management_repositories.yml | 10 + db/docs/dora_daily_metrics.yml | 1 + db/docs/dora_performance_scores.yml | 10 + db/docs/issue_assignment_events.yml | 10 + db/docs/loose_foreign_keys_deleted_records.yml | 2 +- db/docs/merge_request_assignment_events.yml | 10 + db/docs/merge_trains.yml | 4 +- db/docs/namespace_aggregation_schedules.yml | 2 +- db/docs/namespace_limits.yml | 2 +- db/docs/namespaces_storage_limit_exclusions.yml | 2 +- db/docs/namespaces_sync_events.yml | 2 +- db/docs/p_ci_runner_machine_builds.yml | 4 +- db/docs/packages_events.yml | 10 - db/docs/packages_npm_metadata_caches.yml | 10 + db/docs/pm_checkpoints.yml | 2 +- db/docs/pm_licenses.yml | 2 +- db/docs/pm_package_version_licenses.yml | 2 +- db/docs/pm_package_versions.yml | 2 +- db/docs/pm_packages.yml | 2 +- db/docs/project_security_settings.yml | 2 +- db/docs/projects_sync_events.yml | 2 +- db/docs/resource_link_events.yml | 10 + db/docs/schema_inconsistencies.yml | 10 + db/docs/search_indices.yml | 11 + db/docs/search_namespace_index_assignments.yml | 10 + db/docs/serverless_domain_cluster.yml | 2 +- db/docs/service_desk_custom_email_credentials.yml | 11 + db/docs/vulnerability_advisories.yml | 3 +- db/fixtures/development/28_integrations.rb | 2 +- db/fixtures/development/33_triage_ops.rb | 3 +- db/fixtures/development/36_achievements.rb | 2 +- db/fixtures/development/37_timelogs.rb | 99 + db/init_structure.sql | 34495 +++++++++++-------- db/migrate/20210826171758_init_schema.rb | 13 - ...7_add_throttle_authenticated_git_lfs_columns.rb | 23 - db/migrate/20210830140524_add_state_to_member.rb | 21 - .../20210830154358_add_yaml_limit_constraints.rb | 25 - ...d_channel_idx_to_packages_helm_file_metadata.rb | 17 - ...49_add_installable_helm_pkgs_idx_to_packages.rb | 17 - .../20210831203408_upsert_base_work_item_types.rb | 31 - ...04_add_index_on_name_and_id_to_public_groups.rb | 18 - ..._latest_column_into_the_security_scans_table.rb | 13 - ...0902171808_set_default_job_token_scope_false.rb | 17 - ...pire_access_tokens_to_doorkeeper_application.rb | 7 - ...create_stage_issue_events_table_with_bigints.rb | 45 - ...10906100021_delete_project_namespace_trigger.rb | 31 - ...337_add_group_id_fkey_for_user_group_callout.rb | 15 - ...2359_add_user_id_fkey_for_user_group_callout.rb | 15 - ...0908060951_add_dast_schedules_to_plan_limits.rb | 7 - ...32_insert_dast_profile_schedules_plan_limits.rb | 27 - ..._per_stage_page_size_to_application_settings.rb | 7 - ...7_add_sidekiq_limits_to_application_settings.rb | 21 - ...736_add_status_to_dependency_proxy_manifests.rb | 7 - ...8185754_add_status_to_dependency_proxy_blobs.rb | 7 - ...6_add_data_to_vulnerability_finding_evidence.rb | 7 - ...349_add_index_package_id_id_on_package_files.rb | 17 - ...licy_worker_capacity_to_application_settings.rb | 11 - ...p_proxy_ttl_worker_capacity_check_constraint.rb | 15 - ...change_ci_minutes_additional_pack_text_limit.rb | 15 - ..._add_report_type_into_approval_project_rules.rb | 11 - ...03_add_runner_features_to_ci_builds_metadata.rb | 9 - ...13010411_create_agent_project_authorizations.rb | 14 - ...dd_agent_project_authorizations_foreign_keys.rb | 20 - ...namespace_traversal_ids_to_ci_pending_builds.rb | 9 - ...ndency_proxy_manifests_uniqueness_constraint.rb | 18 - ...14145810_add_throttle_deprecated_api_columns.rb | 13 - ..._add_status_index_to_dependency_proxy_tables.rb | 18 - ...x_on_clusters_integration_prometheus_enabled.rb | 15 - ...n_clusters_integration_elastic_stack_enabled.rb | 15 - ...15070423_add_avatar_and_description_to_topic.rb | 15 - ...16132547_add_process_mode_to_resource_groups.rb | 15 - ...mporary_index_for_project_topics_on_taggings.rb | 20 - ...remove_pipeline_fk_from_packages_build_infos.rb | 15 - ...ne_fk_from_packages_package_file_build_infos.rb | 15 - ...19_add_registration_objective_to_user_detail.rb | 7 - ..._text_limit_to_topics_description_and_avatar.rb | 15 - ...est_pipeline_enabled_to_application_settings.rb | 7 - ...63924_index_labels_using_varchar_pattern_ops.rb | 39 - ...eport_type_index_into_approval_project_rules.rb | 15 - ..._namespaces_index_on_name_parent_id_and_type.rb | 15 - ...nique_namespaces_index_on_name_and_parent_id.rb | 15 - ...740_create_issue_customer_relations_contacts.rb | 14 - ...sue_customer_relations_contacts_foreign_keys.rb | 20 - ...dd_meta_data_to_user_credit_card_validations.rb | 13 - ..._holder_name_on_user_credit_card_validations.rb | 23 - ...ex_meta_data_on_user_credit_card_validations.rb | 19 - ...change_default_for_integrated_error_tracking.rb | 11 - ...10928155022_improve_index_for_error_tracking.rb | 33 - ...d_status_id_index_to_dependency_proxy_tables.rb | 18 - .../20210929025600_add_phone_to_user_details.rb | 15 - ...9030834_add_text_limit_to_user_details_phone.rb | 13 - ...31049_add_unique_index_phone_on_user_details.rb | 15 - .../20210929032555_create_verification_codes.rb | 36 - ...igurations_management_project_id_foreign_key.rb | 18 - ...6_add_releases_author_id_id_created_at_index.rb | 14 - ...ally_unwanted_characters_to_project_settings.rb | 16 - ...0081208_fix_deprecated_api_throttle_defaults.rb | 8 - ...001001222_add_source_version_to_bulk_imports.rb | 7 - ...11004062942_create_coverage_fuzzing_corpuses.rb | 18 - .../20211004075629_add_topics_name_gin_index.rb | 15 - ...ernal_event_destination_limit_to_plan_limits.rb | 7 - db/migrate/20211004122540_create_member_tasks.rb | 13 - ...63519_add_foreign_key_to_corpuses_on_project.rb | 15 - ...05063616_add_foreign_key_to_corpuses_on_user.rb | 15 - ...63723_add_foreign_key_to_corpuses_on_package.rb | 15 - ...5092428_drop_time_range_partitioned_loose_fk.rb | 27 - ...5093558_add_range_partitioned_loose_fk_table.rb | 29 - ...1005100112_recreate_loose_fk_insert_function.rb | 40 - ...04_add_member_id_foreign_key_to_member_tasks.rb | 15 - ...5_add_project_id_foreign_key_to_member_tasks.rb | 15 - ...060254_add_topics_total_projects_count_cache.rb | 11 - .../20211006103122_change_helm_channel_length.rb | 14 - ...122010_add_topics_total_projects_count_index.rb | 15 - .../20211007090229_create_issue_search_table.rb | 29 - ...36_add_status_column_to_security_scans_table.rb | 7 - .../20211008043855_remove_notes_trigram_index.rb | 15 - ...ners_duration_to_ci_namespace_monthly_usages.rb | 9 - ...unners_duration_to_ci_project_monthly_usages.rb | 9 - ...us_column_on_clusters_integration_prometheus.rb | 8 - ...20211011004242_create_content_blocked_states.rb | 15 - .../20211011140930_create_ci_namespace_mirrors.rb | 15 - .../20211011140931_create_ci_project_mirrors.rb | 12 - ...20211011140932_create_namespaces_sync_events.rb | 9 - .../20211011141239_create_projects_sync_events.rb | 9 - ...0211011141242_create_namespaces_sync_trigger.rb | 37 - .../20211011141243_create_projects_sync_trigger.rb | 37 - ...12015903_next_traversal_ids_sibling_function.rb | 30 - ...dd_text_limit_to_bulk_imports_source_version.rb | 13 - ...n_up_migrate_merge_request_diff_commit_users.rb | 35 - ..._validation_endpoint_to_application_settings.rb | 20 - ..._add_network_to_user_credit_card_validations.rb | 9 - ...imit_network_on_user_credit_card_validations.rb | 13 - ...lude_network_on_user_credit_card_validations.rb | 17 - ...92749_add_states_into_approval_project_rules.rb | 11 - ...dd_merge_commit_template_to_project_settings.rb | 9 - ...ge_commit_template_limit_to_project_settings.rb | 13 - ...1034_add_tmp_project_id_column_to_namespaces.rb | 11 - ...47_fix_double_entries_in_postgres_index_view.rb | 59 - ...9153615_add_state_to_merge_request_assignees.rb | 8 - ...untime_runner_features_to_ci_builds_metadata.rb | 9 - .../20211020095357_add_group_traversal_id_index.rb | 15 - db/migrate/20211021115409_add_color_to_epics.rb | 10 - ...20211021124715_add_text_limit_to_epics_color.rb | 13 - ..._add_sentry_settings_to_application_settings.rb | 12 - ...s_to_sentry_settings_on_application_settings.rb | 17 - ...03744_add_state_id_to_vsa_issue_stage_events.rb | 7 - ...d_state_id_to_vsa_merge_request_stage_events.rb | 7 - ...336_add_archive_trace_events_to_integrations.rb | 7 - ...026143238_remove_index_releases_on_author_id.rb | 15 - ...27203950_add_updated_index_for_dormant_users.rb | 17 - .../20211028132247_create_packages_npm_metadata.rb | 22 - ...add_default_to_personal_access_tokens_prefix.rb | 7 - db/migrate/20211101132310_add_reindexing_queue.rb | 16 - db/migrate/20211101165656_create_upload_states.rb | 32 - ...hest_role_minimal_access_to_users_statistics.rb | 7 - ...ion_settings_content_validation_endpoint_url.rb | 13 - ...105010101_add_archived_column_to_deployments.rb | 9 - ...56_add_read_at_to_dependency_proxy_manifests.rb | 7 - ...125813_add_read_at_to_dependency_proxy_blobs.rb | 7 - ...11105160316_create_dotenv_application_limits.rb | 8 - ...11105161404_insert_dotenv_application_limits.rb | 27 - ..._create_pipeline_triggers_application_limits.rb | 7 - ..._insert_pipeline_triggers_application_limits.rb | 23 - ...update_dependency_proxy_indexes_with_read_at.rb | 27 - ...4736_add_policy_idx_to_approval_project_rule.rb | 9 - ...211108211434_remove_index_for_resource_group.rb | 17 - ...dd_consume_after_to_loose_fk_deleted_records.rb | 13 - ...10_support_partition_query_in_loose_fk_table.rb | 20 - ...10010101_add_index_on_unarchived_deployments.rb | 15 - .../20211110014701_create_agent_activity_events.rb | 22 - ...15252_add_agent_activity_events_foreign_keys.rb | 35 - db/migrate/20211110092710_create_issue_emails.rb | 21 - ...1110100050_add_has_shimo_to_project_settings.rb | 9 - ..._create_merge_requests_compliance_violations.rb | 13 - ...9_add_fk_compliance_violations_merge_request.rb | 18 - ..._add_fk_compliance_violations_violating_user.rb | 18 - ...d_squash_commit_template_to_project_settings.rb | 9 - ...sh_commit_template_limit_to_project_settings.rb | 13 - ...0211112073413_change_package_index_on_corpus.rb | 19 - ...ault_value_for_personal_access_tokens_prefix.rb | 20 - ...3_create_incident_management_timeline_events.rb | 30 - ...cident_management_timeline_events_on_project.rb | 15 - ..._incident_management_timeline_events_on_user.rb | 15 - ...incident_management_timeline_events_on_issue.rb | 15 - ...7_add_created_at_to_namespace_monthly_usages.rb | 17 - ...4103_add_created_at_to_project_monthly_usage.rb | 17 - ...anagement_timeline_events_on_updated_by_user.rb | 15 - .../20211117174209_create_vulnerability_reads.rb | 24 - ..._value_of_loose_fk_deleted_records_partition.rb | 9 - ...ded_partition_from_loose_fk_trigger_function.rb | 40 - ...max_ssh_key_lifetime_to_application_settings.rb | 7 - ..._key_to_vulnerability_reads_on_vulnerability.rb | 15 - ...oreign_key_to_vulnerability_reads_on_project.rb | 15 - ...oreign_key_to_vulnerability_reads_on_scanner.rb | 15 - ...5015_add_orignal_filename_to_ci_job_artifact.rb | 16 - .../20211119111006_create_job_artifact_states.rb | 32 - ...0211119154221_create_pages_deployment_states.rb | 38 - ...ove_test_report_requirement_issue_constraint.rb | 16 - ...red_approval_count_to_protected_environments.rb | 7 - .../20211119195201_create_deployment_approvals.rb | 13 - .../20211122103051_add_line_code_to_draft_notes.rb | 10 - ...dd_policy_idx_to_approval_merge_request_rule.rb | 9 - ...hed_background_migration_job_transition_logs.rb | 38 - ...add_user_foreign_key_to_deployment_approvals.rb | 15 - ..._make_iteration_cadences_start_date_nullable.rb | 7 - ...4095704_add_draft_notes_line_code_text_limit.rb | 13 - ...d_static_objects_external_storage_auth_token.rb | 14 - ...6042235_add_sequence_column_to_sprints_table.rb | 14 - ...r_static_objects_external_storage_auth_token.rb | 12 - ...t_static_objects_external_storage_auth_token.rb | 31 - ...1126142200_add_encrypted_static_object_token.rb | 16 - ..._text_limit_to_encrypted_static_object_token.rb | 13 - .../20211126204445_add_task_to_work_item_types.rb | 31 - ...tructure_column_to_vulnerability_occurrences.rb | 7 - ...occurrences_migrated_to_new_structure_column.rb | 15 - ..._incident_management_timeline_events_on_note.rb | 15 - ...19_add_uniqueness_for_evidence_occurrence_id.rb | 18 - ...future_subscriptions_to_application_settings.rb | 7 - .../20211201143042_create_lfs_object_states.rb | 32 - ...ployment_foreign_key_to_deployment_approvals.rb | 15 - ...e_loose_fk_deleted_records_to_dynamic_schema.rb | 17 - ..._packages_build_infos_package_id_pipeline_id.rb | 18 - ..._state_by_user_id_to_merge_request_reviewers.rb | 12 - ...e_request_reviewers_updated_state_by_user_id.rb | 15 - ..._state_by_user_id_to_merge_request_assignees.rb | 9 - ...e_request_assignees_updated_state_by_user_id.rb | 15 - ...6_add_index_snippets_on_project_id_and_title.rb | 15 - ...rs_index_on_created_at_where_active_is_false.rb | 15 - ..._index_on_contacted_at_where_active_is_false.rb | 15 - ...nts_required_approval_count_check_constraint.rb | 15 - ...11425_add_executor_type_column_to_ci_runners.rb | 7 - ...209230042_add_status_to_cluster_agent_tokens.rb | 7 - .../20211210025754_alter_constraint_of_phone.rb | 17 - ...0031721_change_user_details_phone_text_limit.rb | 15 - ...11213130324_update_timelogs_spent_at_default.rb | 7 - ...3142344_add_settings_user_email_lookup_limit.rb | 13 - ...3154259_add_status_to_packages_package_files.rb | 7 - ...4_add_status_index_to_packages_package_files.rb | 15 - ...ve_temp_index_from_vulnerability_occurrences.rb | 15 - ..._update_application_settings_protected_paths.rb | 58 - ..._add_cluster_agent_id_to_vulnerability_reads.rb | 10 - ...imit_to_vulnerability_reads_cluster_agent_id.rb | 13 - ...20211216135651_add_index_to_cluster_agent_id.rb | 16 - .../20211216220939_add_group_crm_settings.rb | 13 - ...e_id_foreign_key_from_project_pages_metadata.rb | 19 - ...re_scanning_actions_to_onboarding_progresses.rb | 15 - ...211223125921_add_temp_index_to_members_state.rb | 16 - ...file_worker_capacity_to_application_settings.rb | 13 - ...er_capacity_check_constraint_to_app_settings.rb | 15 - ...4174445_add_ci_runners_index_on_active_state.rb | 15 - ...rification_token_to_external_ae_destinations.rb | 13 - ...20220105121325_add_route_namespace_reference.rb | 13 - ..._state_by_user_id_to_merge_request_assignees.rb | 15 - ..._state_by_user_id_to_merge_request_reviewers.rb | 15 - ...insert_or_update_vulnerability_reads_trigger.rb | 58 - ...12043_add_update_vulnerability_reads_trigger.rb | 40 - ..._update_vulnerability_reads_location_trigger.rb | 41 - .../20220106141756_remove_lock_version_indexes.rb | 23 - ...dd_has_issues_on_vulnerability_reads_trigger.rb | 79 - ..._add_registry_migration_application_settings.rb | 15 - ..._migration_columns_to_container_repositories.rb | 19 - .../20220107091629_add_route_namespace_index.rb | 19 - db/migrate/20220107165036_remove_note_id_index.rb | 16 - ...33006_remove_ci_pipelines_lock_version_index.rb | 17 - .../20220110170953_create_ci_secure_files.rb | 19 - ...0111095006_add_maintainer_note_to_ci_runners.rb | 12 - ...add_text_limit_to_ci_runners_maintainer_note.rb | 13 - ...111154950_add_token_expires_at_to_ci_runners.rb | 7 - ...951_add_index_to_ci_runners_token_expires_at.rb | 15 - ...20111200254_remove_index_from_merge_requests.rb | 15 - ...13_add_requires_verification_to_user_details.rb | 9 - ...112205111_create_security_training_providers.rb | 14 - ...0220112232037_add_member_namespace_reference.rb | 13 - .../20220112232605_add_member_namespace_index.rb | 19 - .../20220113125401_create_security_trainings.rb | 18 - ..._package_files_limit_to_application_settings.rb | 7 - ...ion_settings_package_files_limit_constraints.rb | 15 - ...3164801_add_diffs_colors_to_user_preferences.rb | 13 - ..._text_limit_to_user_preferences_diffs_colors.rb | 15 - ..._status_only_index_to_packages_package_files.rb | 15 - ...1_add_text_limit_to_exad_verification_tokens.rb | 13 - ..._to_container_repositories_migration_columns.rb | 15 - ...15633_add_url_text_to_issuable_metric_images.rb | 10 - ...add_url_text_limit_to_issuable_metric_images.rb | 13 - ...mit_to_container_registry_import_target_plan.rb | 13 - ...on_interval_settings_to_application_settings.rb | 9 - ...tion_interval_settings_to_namespace_settings.rb | 11 - ...ration_interval_settings_to_project_settings.rb | 9 - ...3_add_unique_index_to_aed_verification_token.rb | 15 - ...ependency_proxy_size_to_namespace_statistics.rb | 7 - ...xy_size_to_namespace_root_storage_statistics.rb | 7 - ...ulnerability_occurrences_deduplication_index.rb | 20 - ...9220620_add_scan_method_to_dast_site_profile.rb | 11 - ..._create_alert_management_alert_metric_images.rb | 18 - ...er_project_index_to_runner_id_and_project_id.rb | 19 - ...p_index_on_id_from_vulnerability_occurrences.rb | 15 - ...mp_index_for_group_namespace_member_backfill.rb | 17 - db/migrate/20220124200927_add_index_to_issues.rb | 17 - ...tempts_to_loose_foreign_keys_deleted_records.rb | 13 - ...122228_add_topics_non_private_projects_count.rb | 11 - ..._add_topics_non_private_projects_count_index.rb | 15 - ...dex_on_project_id_and_id_for_vulnerabilities.rb | 15 - ...1624_add_scan_file_path_to_dast_site_profile.rb | 14 - ..._sk_key_restrictions_to_application_settings.rb | 10 - ...and_import_done_at_to_container_repositories.rb | 14 - ...evel_to_merge_requests_compliance_violations.rb | 7 - ...ow_diff_preview_in_email_to_project_settings.rb | 9 - ...0_remove_index_for_vulnerability_occurrences.rb | 17 - ...nd_migration_state_to_container_repositories.rb | 16 - ..._migration_indexes_to_container_repositories.rb | 21 - .../20220203074916_add_topics_lower_name_index.rb | 15 - ...s_index_excluding_pending_destruction_status.rb | 28 - ...220203123333_add_batched_migration_max_batch.rb | 7 - ...source_license_available_to_project_settings.rb | 9 - .../20220203134942_add_hidden_to_projects.rb | 11 - ...reate_analytics_cycle_analytics_aggregations.rb | 43 - ...n_greatest_done_at_to_container_repositories.rb | 17 - ...193000_add_integrations_encrypted_properties.rb | 8 - ...users_get_by_id_limit_to_application_setting.rb | 15 - ...not_valid_foreign_key_to_ci_builds_runner_id.rb | 15 - ...ate_default_scan_method_of_dast_site_profile.rb | 24 - ...p_populate_topics_non_private_projects_count.rb | 15 - .../20220211125954_create_related_epic_links.rb | 18 - ...rations_trigger_type_new_on_insert_null_safe.rb | 36 - ...20213100000_remove_integration_type_triggers.rb | 32 - ...ner_registry_exp_pol_worker_capacity_default.rb | 20 - db/migrate/20220216110023_create_saved_replies.rb | 20 - ...ion_policies_caching_to_application_settings.rb | 13 - ...7113058_add_status_to_status_check_responses.rb | 7 - ...33_change_maintainer_note_limit_in_ci_runner.rb | 24 - ...d_target_access_levels_to_broadcast_messages.rb | 11 - ...ion_policy_configuration_namespace_reference.rb | 11 - ...tration_policy_configuration_namespace_index.rb | 27 - ...constraint_to_security_policy_configurations.rb | 14 - ...estration_policy_configuration_project_index.rb | 17 - ..._create_project_build_artifacts_size_refresh.rb | 24 - .../20220302110724_add_group_features_table.rb | 19 - ...03190555_add_comment_to_deployment_approvals.rb | 10 - ...d_text_limit_to_deployment_approvals_comment.rb | 13 - ...ove_not_null_contraint_on_title_from_sprints.rb | 17 - ...r_sprints_on_iterations_cadence_id_and_title.rb | 15 - ...ue_index_for_sprints_on_project_id_and_title.rb | 15 - ...to_required_python_on_packages_pypi_metadata.rb | 11 - ...mail_lookup_limit_setting_to_search_settings.rb | 13 - ...0648_add_time_to_restore_service_dora_metric.rb | 7 - ...abase_grafana_config_to_application_settings.rb | 13 - ...mit_to_database_grafana_application_settings.rb | 15 - .../20220310101118_update_holder_name_limit.rb | 28 - ..._registry_access_level_into_project_features.rb | 13 - ..._create_protected_environment_approval_rules.rb | 30 - db/migrate/20220314184009_init_schema.rb | 13 + ...ner_registration_enabled_to_project_settings.rb | 9 + ...abase_apdex_settings_to_application_settings.rb | 7 + ..._add_project_group_link_on_delete_cascade_fk.rb | 21 + ...6_add_custom_jira_regex_to_jira_tracker_data.rb | 12 + ...4_add_text_limit_to_custom_jira_regex_fields.rb | 15 + ...d_partitioning_info_to_postgres_foreign_keys.rb | 90 + ...6_add_role_approvers_to_scan_result_policies.rb | 9 + ...07000000_create_design_management_repository.rb | 11 + ...20230307132729_create_schema_inconsistencies.rb | 15 + ...ove_create_learn_gitlab_worker_job_instances.rb | 11 + ...230308154243_add_package_id_to_ml_candidates.rb | 7 + ..._add_package_id_foreign_key_to_ml_candidates.rb | 15 + ...45_add_index_on_package_id_for_ml_candidates.rb | 15 + db/migrate/20230313012226_create_search_indices.rb | 18 + ...09_create_search_namespace_index_assignments.rb | 26 + ...gn_key_to_search_namespace_index_assignments.rb | 18 + .../20230313031351_create_resource_link_events.rb | 15 + ...13181536_create_packages_npm_metadata_caches.rb | 26 + ...230315053635_add_screenshot_to_abuse_reports.rb | 10 + ...93433_insert_daily_invites_trial_plan_limits.rb | 19 + ...create_service_desk_custom_email_credentials.rb | 22 + ...2059_add_current_user_todos_work_item_widget.rb | 57 + ...0230321085011_add_column_to_users_statistisc.rb | 7 + ...dexes_to_merge_request_compliance_violations.rb | 29 + ...230321153304_rename_ml_candidates_iid_to_eid.rb | 13 + ...dd_project_access_token_limit_to_plan_limits.rb | 7 + ...0321161441_insert_project_access_token_limit.rb | 15 + ...230321162810_add_project_id_to_ml_candidates.rb | 9 + ...902_add_index_on_project_id_on_ml_candidates.rb | 15 + ..._add_project_id_foreign_key_to_ml_candidates.rb | 15 + ...30321170734_add_internal_id_to_ml_candidates.rb | 7 + ...n_project_id_on_internal_id_to_ml_candidates.rb | 15 + ..._foreign_key_to_packages_npm_metadata_caches.rb | 19 + ...605_rerun_remove_invalid_deploy_access_level.rb | 26 + ...512_add_valid_deploy_access_level_constraint.rb | 16 + ..._silent_mode_enabled_to_application_settings.rb | 7 + ...30323101138_add_award_emoji_work_item_widget.rb | 57 + ...0230323120601_create_dora_performance_scores.rb | 16 + ...40745_add_root_directory_to_pages_deployment.rb | 10 + ...ext_limit_to_pages_deployment_root_directory.rb | 13 + .../20230323153042_track_push_rules_deletions.rb | 15 + db/migrate/20230323153328_track_tags_deletions.rb | 15 + ...3191750_add_shard_settings_to_search_indices.rb | 8 + ...2_add_text_limit_to_abuse_reports_screenshot.rb | 13 + ...ckfill_product_analytics_data_collector_host.rb | 20 + ..._merge_requests_on_state_id_and_merge_status.rb | 17 + ...ersion_of_award_emoji_awardable_id_to_bigint.rb | 16 + ...ize_conversion_of_events_target_id_to_bigint.rb | 16 + ...29032129_add_lock_version_to_terraform_state.rb | 9 + ..._foreign_key_to_resource_link_events_on_user.rb | 15 + ...add_achievements_enabled_to_user_preferences.rb | 9 + ...x_packages_debian_file_metadata_when_unknown.rb | 17 + ...reate_fk_ml_candidate_params_on_candidate_id.rb | 29 + ...idate_fk_ml_candidate_params_on_candidate_id.rb | 13 + ...e_old_fk_ml_candidate_params_on_candidate_id.rb | 21 + ...eate_fk_ml_candidate_metrics_on_candidate_id.rb | 29 + ...date_fk_ml_candidate_metrics_on_candidate_id.rb | 13 + ..._old_fk_ml_candidate_metrics_on_candidate_id.rb | 21 + ...330215636_remove_unused_project_jira_indexes.rb | 34 + ...2006_add_open_ai_api_key_application_setting.rb | 8 + ...ackground_migrations_to_application_settings.rb | 8 + ...batched_background_migrations_for_gitlab_com.rb | 17 + ...3620_add_pinned_nav_items_to_user_preference.rb | 9 + .../20230403145705_add_purl_sync_to_settings.rb | 7 + ...rage_size_columns_to_root_storage_statistics.rb | 11 + ..._namespace_index_to_storage_limit_exclusions.rb | 25 + ...em_note_metadata_id__to_resource_link_events.rb | 7 + ...ource_link_events_on_system_note_metadata_id.rb | 15 + ...metadata_foreign_key_to_resource_link_events.rb | 16 + ...e_instance_external_audit_event_destinations.rb | 14 + ...ource_link_events_on_system_note_metadata_id.rb | 11 + ...544_add_pa_configurator_base_to_app_settings.rb | 13 + ...4436_add_identity_toggle_to_user_preferences.rb | 9 + ...ent_user_access_project_authorizations_table.rb | 17 + ...agent_user_access_group_authorizations_table.rb | 17 + ..._add_fks_to_agent_user_access_authorizations.rb | 34 + ...6_add_code_suggestions_to_namespace_settings.rb | 9 + ...tics_instrumentation_key_to_project_settings.rb | 21 + .../20230411171001_create_abuse_trust_scores.rb | 16 + ...0230412073614_create_issue_assignment_events.rb | 14 + ...add_concurrent_fk_to_issue_assignment_events.rb | 16 + ...2151659_add_ci_job_artifacts_file_final_path.rb | 12 + ...80906_create_merge_request_assignment_events.rb | 15 + ...urrent_fk_to_merge_request_assignment_events.rb | 16 + ...imit_to_project_settings_instrumentation_key.rb | 13 + ...que_index_dast_site_token_project_id_and_url.rb | 19 - ...e_extract_project_topics_into_separate_table.rb | 18 - ...p_temporary_trigger_for_ci_sources_pipelines.rb | 28 - ...t_payloads_bigint_conversion_remove_triggers.rb | 28 - ...237_events_bigint_conversion_remove_triggers.rb | 26 - ...4_slice_merge_request_diff_commit_migrations.rb | 59 - ...01184511_prepare_async_indexes_for_ci_builds.rb | 80 - ...rary_columns_and_triggers_for_ci_build_needs.rb | 26 - ...lumns_and_triggers_for_ci_build_trace_chunks.rb | 20 - ..._temporary_columns_and_triggers_for_taggings.rb | 18 - ...nup_bigint_conversion_for_ci_builds_metadata.rb | 17 - ...1940_cleanup_bigint_conversion_for_ci_stages.rb | 19 - ...45_cleanup_bigint_conversion_for_deployments.rb | 19 - ...nversion_for_geo_job_artifact_deleted_events.rb | 19 - ...7211557_finalize_ci_builds_bigint_conversion.rb | 223 - ...08132335_disable_job_token_scope_when_unused.rb | 11 - ...extract_project_topics_into_separate_table_2.rb | 16 - ...0909152027_remove_container_registry_enabled.rb | 17 - ...ort_type_for_existing_approval_project_rules.rb | 39 - ...ex_on_pending_builds_namespace_traversal_ids.rb | 15 - ...4095310_cleanup_orphan_project_access_tokens.rb | 54 - ...2415_cleanup_bigint_conversion_for_ci_builds.rb | 16 - ...esource_group_status_commit_id_for_ci_builds.rb | 15 - ...recalculate_vulnerabilities_occurrences_uuid.rb | 18 - ...recalculate_vulnerabilities_occurrences_uuid.rb | 12 - ...ds_foreign_key_from_terraform_state_versions.rb | 15 - ..._location_index_to_vulnerability_occurrences.rb | 18 - ...21816_drop_int4_columns_for_ci_job_artifacts.rb | 10 - ...31_drop_int4_column_for_ci_sources_pipelines.rb | 9 - .../20210922082019_drop_int4_column_for_events.rb | 9 - ...esource_group_status_commit_id_for_ci_builds.rb | 22 - ...402_drop_int4_column_for_push_event_payloads.rb | 9 - ...210923133143_remove_redundant_taggings_index.rb | 15 - ...move_delayed_project_removal_from_namespaces.rb | 19 - ...ve_foreign_keys_from_open_project_data_table.rb | 17 - ...0210923192649_remove_open_project_data_table.rb | 22 - ...3807_update_issues_relative_position_indexes.rb | 24 - .../20210930211936_backfill_user_namespace.rb | 26 - ...4110500_add_temporary_index_to_issue_metrics.rb | 17 - ...chedule_fix_first_mentioned_in_commit_at_job.rb | 27 - ...1004151202_remove_bio_html_from_user_details.rb | 10 - ...101_rereschedule_delete_orphaned_deployments.rb | 23 - ...ity_ci_builds_on_name_and_id_parser_features.rb | 29 - ...211005194425_schedule_requirements_migration.rb | 35 - ...e_populate_topics_total_projects_count_cache.rb | 23 - ...exes_for_ci_job_artifacts_expire_at_unlocked.rb | 16 - ...11006174114_add_namespace_index_on_type_sync.rb | 20 - ...remove_analytics_snapshots_segment_id_column.rb | 17 - ...ule_populate_status_column_of_security_scans.rb | 11 - .../20211011104843_add_new_loose_fk_index.rb | 20 - ...te_orphaned_deployments_background_migration.rb | 15 - ...221_add_index_btree_namespaces_traversal_ids.rb | 15 - ...815_remove_merge_request_diff_commit_columns.rb | 13 - ...le_and_status_from_pending_alert_escalations.rb | 29 - ...ity_ci_builds_on_name_and_id_parser_features.rb | 26 - ...to_tmp_project_id_column_on_namespaces_table.rb | 15 - ...to_tmp_project_id_column_on_namespaces_table.rb | 13 - ...d_index_to_group_id_column_on_webhooks_table.rb | 15 - ...null_constraint_and_default_for_public_email.rb | 15 - ...e_remove_duplicate_vulnerabilities_findings3.rb | 22 - ...add_deployments_environment_id_and_ref_index.rb | 15 - ...21140426_remove_geo_upload_deprecated_fields.rb | 27 - ...1141930_drop_geo_upload_deleted_events_table.rb | 17 - ..._location_index_to_vulnerability_occurrences.rb | 18 - ...builds_on_name_and_id_parser_features_broken.rb | 26 - ..._remove_outdated_fields_from_geo_node_status.rb | 12 - ...ulnerability_finding_signatures_for_findings.rb | 17 - ...23102243_schedule_delete_invalid_epic_issues.rb | 14 - .../20211026070408_backfill_issue_search_data.rb | 22 - .../20211027043206_track_ci_pipeline_deletions.rb | 15 - .../20211027043229_track_ci_build_deletions.rb | 15 - ...20211027064021_track_deletions_in_ci_runners.rb | 15 - ...20211027064156_track_deletions_in_chat_names.rb | 15 - ...t_and_before_expiry_notification_undelivered.rb | 17 - ...0211027204011_remove_index_for_dormant_users.rb | 17 - ..._index_to_vulnerability_occurrence_pipelines.rb | 23 - ..._delete_issue_merge_request_taggings_records.rb | 16 - ..._delete_issue_merge_request_taggings_records.rb | 23 - ...nc_index_on_events_using_btree_created_at_id.rb | 16 - ...ix_merge_request_diff_commit_users_migration.rb | 55 - .../20211029102822_add_open_source_plan.rb | 39 - ...1031152417_add_indexes_to_issue_stage_events.rb | 41 - ...19_add_indexes_to_merge_request_stage_events.rb | 41 - ...222614_consume_remaining_user_namespace_jobs.rb | 26 - ..._add_temp_index_to_vulnerability_occurrences.rb | 15 - ...02_update_vulnerability_occurrences_location.rb | 24 - ...403_remove_propagate_service_template_worker.rb | 11 - ...dd_index_on_events_using_btree_created_at_id.rb | 17 - ...drop_runner_features_from_ci_builds_metadata.rb | 13 - ...20211104044453_remove_redundant_events_index.rb | 13 - ...104165220_remove_vulnerability_finding_links.rb | 14 - .../20211105135157_drop_ci_build_trace_sections.rb | 99 - ...2454_drop_old_loose_fk_deleted_records_index.rb | 20 - ...ot_null_constraint_to_security_findings_uuid.rb | 20 - ...dd_temporary_index_on_security_findings_uuid.rb | 23 - ...1350_schedule_drop_invalid_security_findings.rb | 25 - ...emove_ci_pipeline_chat_data_fk_on_chat_names.rb | 22 - ...5151704_add_index_on_projects_import_type_id.rb | 15 - ...091751_change_namespace_type_default_to_user.rb | 17 - ...lines_and_duplicate_vulnerabilities_findings.rb | 23 - ...17084814_migrate_remaining_u2f_registrations.rb | 26 - ...11118130836_drop_pages_deployments_builds_fk.rb | 22 - .../20211118194239_drop_invalid_remediations.rb | 25 - ...text_limit_to_job_artifact_original_filename.rb | 13 - ...2033501_improve_index_on_events_for_calendar.rb | 13 - ...ound_migration_of_requirements_to_work_items.rb | 17 - ...cleanup_after_drop_invalid_security_findings.rb | 26 - ...124132705_change_index_users_on_public_email.rb | 22 - ...125120444_add_index_todos_project_id_user_id.rb | 15 - ...3_backfill_sequence_column_for_sprints_table.rb | 24 - ...20211130201100_track_deletions_in_namespaces.rb | 15 - .../20211130201101_track_deletions_in_projects.rb | 15 - ..._clusters_applications_runners_ci_runners_fk.rb | 15 - ...0211202145237_add_todos_project_and_id_index.rb | 32 - ..._index_to_projects_on_marked_for_deletion_at.rb | 15 - ...1_create_calendar_events_index_synchronously.rb | 15 - ...11206074547_remove_old_calendar_events_index.rb | 18 - ..._indexes_for_primary_email_cleanup_migration.rb | 28 - ..._index_ci_job_artifacts_project_id_file_type.rb | 15 - ...90503_cleanup_first_mentioned_in_commit_jobs.rb | 22 - ...recalculate_vulnerabilities_occurrences_uuid.rb | 16 - ...lculate_uuid_on_vulnerabilities_occurrences4.rb | 28 - ...e_extra_finding_evidence_tables_foreign_keys.rb | 57 - ...7173511_remove_extra_finding_evidence_tables.rb | 71 - ...22200_schedule_backfill_ci_namespace_mirrors.rb | 11 - ...8122201_schedule_backfill_ci_project_mirrors.rb | 11 - ...ulnerability_finding_signatures_for_findings.rb | 27 - ...0211209093636_track_ci_job_artifacts_deletes.rb | 15 - .../20211209093828_track_users_deletes.rb | 15 - ...9093923_track_external_pull_requests_deletes.rb | 15 - .../20211209094222_track_merge_requests_deletes.rb | 15 - ...103048_backfill_project_namespaces_for_group.rb | 41 - .../20211209203820_add_tmp_index_on_report_type.rb | 16 - ...onvert_stringified_raw_metadata_hash_to_json.rb | 25 - ...0000_add_temporary_static_object_token_index.rb | 15 - .../20211210140629_encrypt_static_object_token.rb | 22 - ...137_remove_vulnerability_finding_links_again.rb | 14 - ..._location_index_to_vulnerability_occurrences.rb | 18 - ...211213102111_drop_ci_pipelines_mr_metrics_fk.rb | 15 - ..._backfill_incident_issue_escalation_statuses.rb | 9 - ...90620_schedule_update_timelogs_null_spent_at.rb | 23 - ..._location_index_to_vulnerability_occurrences.rb | 41 - ...dex_to_events_on_author_id_and_action_and_id.rb | 14 - ..._recalculate_finding_signatures_as_completed.rb | 20 - ...emporary_indexes_for_primary_email_migration.rb | 28 - ...ex_on_ci_pipelines_user_id_id_failure_reason.rb | 15 - .../20211220123956_update_invalid_member_states.rb | 21 - ..._index_ci_job_artifacts_project_id_file_type.rb | 15 - ..._index_events_on_author_id_and_action_and_id.rb | 17 - ...3031_add_index_to_events_on_author_id_and_id.rb | 15 - ...move_foreign_key_ci_group_variables_group_id.rb | 17 - ...al_packs_namespace_id_foreign_key_constraint.rb | 17 - ...220106185033_remove_finding_evidence_summary.rb | 15 - ...ci_daily_build_group_report_results_group_id.rb | 17 - ...e_foreign_key_ci_pending_builds_namespace_id.rb | 17 - ...oreign_key_ci_runner_namespaces_namespace_id.rb | 17 - .../20220107064845_populate_vulnerability_reads.rb | 25 - ...dd_idx_vulnerability_occurrences_dedup_again.rb | 17 - ...1049_schedule_populate_test_reports_issue_id.rb | 23 - ..._dast_scanner_profiles_builds_ci_build_id_fk.rb | 18 - ...irements_management_test_reports_build_id_fk.rb | 18 - ...ove_dast_site_profiles_builds_ci_build_id_fk.rb | 18 - ...0111002756_remove_security_scans_build_id_fk.rb | 18 - ...1023852_index_cluster_agent_tokens_on_status.rb | 15 - .../20220111093534_remove_index_on_auto_stop_in.rb | 17 - ...20111101421_remove_index_on_merge_request_id.rb | 17 - .../20220111102314_truncate_ci_mirror_tables.rb | 14 - ...1221516_remove_projects_ci_pending_builds_fk.rb | 15 - ...2015940_remove_projects_ci_running_builds_fk.rb | 17 - ...de_delete_from_project_namespace_foreign_key.rb | 23 - ..._remove_projects_ci_unit_tests_project_id_fk.rb | 15 - ...ily_build_group_report_results_project_id_fk.rb | 16 - ...ove_projects_ci_freeze_periods_project_id_fk.rb | 15 - ...ve_projects_ci_resource_groups_project_id_fk.rb | 15 - ...ojects_ci_build_report_results_project_id_fk.rb | 15 - ...job_token_project_scope_links_added_by_id_fk.rb | 15 - ...move_users_ci_pipeline_schedules_owner_id_fk.rb | 15 - ...111440_schedule_fix_incorrect_max_seats_used.rb | 20 - .../20220114105525_add_index_on_projects_path.rb | 17 - ...d_author_index_to_design_management_versions.rb | 16 - ...er_agent_tokens_on_agent_id_and_last_used_at.rb | 15 - ...ulnerability_finding_signatures_for_findings.rb | 29 - ...ate_audit_event_streaming_verification_token.rb | 19 - ...projects_ci_pipeline_artifacts_project_id_fk.rb | 17 - ...ts_ci_sources_pipelines_source_project_id_fk.rb | 17 - ...9144458_remove_users_ci_triggers_owner_id_fk.rb | 17 - ...ge_requests_ci_pipelines_merge_request_id_fk.rb | 19 - ...ove_ci_pipelines_merge_trains_pipeline_id_fk.rb | 17 - ...pipelines_merge_requests_head_pipeline_id_fk.rb | 17 - ...es_dast_profiles_pipelines_ci_pipeline_id_fk.rb | 17 - ...lnerability_statistics_latest_pipeline_id_fk.rb | 17 - ...rability_occurrence_pipelines_pipeline_id_fk.rb | 17 - ...0094340_drop_position_from_security_findings.rb | 9 - ...23700_add_tmp_index_routes_id_for_namespaces.rb | 17 - ...0_backfill_namespace_id_for_namespace_routes.rb | 27 - ...ckfill_member_namespace_id_for_group_members.rb | 27 - ...4752_remove_projects_ci_stages_project_id_fk.rb | 20 - ...3_re_remove_projects_ci_stages_project_id_fk.rb | 19 - ...1_remove_projects_ci_variables_project_id_fk.rb | 19 - .../20220124130028_dedup_runner_projects.rb | 71 - ...rojects_external_pull_requests_project_id_fk.rb | 19 - ...56_remove_projects_ci_triggers_project_id_fk.rb | 19 - ...ve_projects_ci_runner_projects_project_id_fk.rb | 19 - ...scriptions_projects_downstream_project_id_fk.rb | 19 - ...move_projects_ci_job_artifacts_project_id_fk.rb | 20 - ...move_projects_ci_job_artifacts_project_id_fk.rb | 19 - ...ve_projects_ci_builds_metadata_project_id_fk.rb | 20 - ...ve_projects_ci_builds_metadata_project_id_fk.rb | 19 - ...ubscriptions_projects_upstream_project_id_fk.rb | 19 - ..._projects_ci_sources_pipelines_project_id_fk.rb | 19 - ...214131_remove_projects_ci_refs_project_id_fk.rb | 19 - ...ken_project_scope_links_source_project_id_fk.rb | 19 - ...ects_ci_project_monthly_usages_project_id_fk.rb | 19 - ...st_site_profiles_pipelines_ci_pipeline_id_fk.rb | 19 - ...elines_vulnerability_feedback_pipeline_id_fk.rb | 19 - ...e_populate_topics_non_private_projects_count.rb | 23 - ...ken_project_scope_links_target_project_id_fk.rb | 19 - ...cts_ci_sources_projects_source_project_id_fk.rb | 19 - ...projects_ci_pipeline_schedules_project_id_fk.rb | 19 - ...0021_remove_projects_ci_builds_project_id_fk.rb | 20 - ...2_re_remove_projects_ci_builds_project_id_fk.rb | 19 - ...7_remove_projects_ci_pipelines_project_id_fk.rb | 19 - ...3_add_index_to_merge_request_assignees_state.rb | 15 - ...2_add_index_to_merge_request_reviewers_state.rb | 15 - ...132200_cleanup_backfill_ci_namespace_mirrors.rb | 11 - ...27132201_cleanup_backfill_ci_project_mirrors.rb | 11 - ..._schedule_delete_invalid_epic_issues_revised.rb | 27 - ...0220128155251_remove_dangling_running_builds.rb | 25 - ...x_approval_rules_code_owners_rule_type_index.rb | 23 - ...ex_job_artifacts_on_trace_type_and_expire_at.rb | 16 - ...20220131000001_schedule_trace_expiry_removal.rb | 55 - ...clusters_kubernetes_namespaces_on_cluster_id.rb | 15 - ...und_migration_populate_test_reports_issue_id.rb | 15 - ...01173212_add_user_details_provisioning_index.rb | 18 - ...to_vulnerability_finding_links_with_truncate.rb | 20 - ...220202105733_delete_service_template_records.rb | 16 - ...04053655_remove_index_epic_issues_on_epic_id.rb | 15 - ...espace_statistics_with_dependency_proxy_size.rb | 25 - ...110725_backfill_cycle_analytics_aggregations.rb | 33 - ...0220204194347_encrypt_integration_properties.rb | 22 - ...220207080758_update_api_indexes_for_projects.rb | 48 - ...rsonal_namespace_project_maintainer_to_owner.rb | 25 - ...20208115439_start_backfill_ci_queuing_tables.rb | 24 - ...ctive_cluster_image_scanning_vulnerabilities.rb | 16 - ...20735_schedule_fix_incorrect_max_seats_used2.rb | 20 - .../20220213103859_remove_integrations_type.rb | 132 - ...04531_create_indexes_on_integration_type_new.rb | 60 - ...onvert_stringified_raw_metadata_hash_to_json.rb | 27 - ...ackage_files_limit_from_application_settings.rb | 18 - ...ot_null_constraint_on_security_findings_uuid.rb | 13 - ...928_remove_show_diff_preview_in_email_column.rb | 13 - ..._null_constraint_for_security_scan_succeeded.rb | 11 - ...2524_create_not_null_constraint_releases_tag.rb | 13 - .../20220222192525_remove_null_releases.rb | 24 - ...hedule_nullify_orphan_runner_id_on_ci_builds.rb | 27 - ...3124428_schedule_merge_topics_with_same_name.rb | 23 - ...0224000000_async_build_trace_expire_at_index.rb | 14 - ...ilds_on_name_and_id_parser_with_new_features.rb | 31 - ...225133705_cleanup_backfill_ci_queuing_tables.rb | 15 - ...220301093434_backfill_all_project_namespaces.rb | 29 - .../20220302114046_backfill_group_features.rb | 27 - ...ilds_on_name_and_id_parser_with_new_features.rb | 28 - ...20220304165107_drop_partitioned_foreign_keys.rb | 19 - ..._unique_index_on_security_training_providers.rb | 15 - ...220305223212_add_security_training_providers.rb | 40 - ...ex_for_remove_duplicate_project_tag_releases.rb | 17 - ...192610_remove_duplicate_project_tag_releases.rb | 26 - ...ex_for_remove_duplicate_project_tag_releases.rb | 17 - ...2725_create_unique_index_release_tag_project.rb | 23 - ...kup_limit_setting_to_search_settings_cleanup.rb | 15 - ...ity_ci_builds_on_name_and_id_parser_features.rb | 26 - ...i_runners_token_encrypted_values_on_projects.rb | 27 - ...uplicate_ci_runners_token_values_on_projects.rb | 27 - ...084838_remove_external_pull_request_tracking.rb | 15 - ...ove_leftover_external_pull_request_deletions.rb | 30 - ...9154855_add_index_on_issues_closed_incidents.rb | 15 - ...index_ci_job_artifacts_project_id_created_at.rb | 16 - ...roject_id_and_released_at_and_id_on_releases.rb | 16 - ...remove_dependency_list_usage_data_from_redis.rb | 13 - ...te_scan_id_and_id_index_on_security_findings.rb | 15 - ...4154235_migrate_vulnerability_approval_rules.rb | 17 - ...index_ci_job_artifacts_project_id_created_at.rb | 15 - ..._admin_mode_scope_for_personal_access_tokens.rb | 18 +- ...131194959_remove_invalid_deploy_access_level.rb | 11 +- .../20230208125736_schedule_migration_for_links.rb | 11 +- ...emove_project_group_link_with_missing_groups.rb | 27 + ..._partial_index_on_vulnerability_report_types.rb | 16 + ...ule_migrate_shared_vulnerability_identifiers.rb | 26 + ...24144233_migrate_evidences_from_raw_metadata.rb | 11 +- ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...erge_request_user_mentions_note_id_to_bigint.rb | 83 + ...007_queue_backfill_project_wiki_repositories.rb | 16 +- ..._ci_builds_constraints_for_list_partitioning.rb | 15 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...0313142631_backfill_ml_candidates_package_id.rb | 23 + ...0230314144640_reschedule_migration_for_links.rb | 32 + ...tion_setting_from_soft_email_confirmation_ff.rb | 23 + ...704_finalize_issues_iid_scoping_to_namespace.rb | 20 + ...set_notifications_bigint_conversion_backfill.rb | 34 + ...20230316014651_remove_index_on_events_action.rb | 13 + ...26_swap_ci_runner_machine_builds_primary_key.rb | 11 + ...6164917_remove_packages_events_package_id_fk.rb | 31 + .../20230316185746_drop_packages_events_table.rb | 23 + ...52_add_tmp_unique_packages_index_when_debian.rb | 23 + ...20230317080000_ensure_unique_debian_packages.rb | 48 + ...080137_add_unique_packages_index_when_debian.rb | 29 + ...230317151841_remove_from_to_state_constraint.rb | 21 + ...95228_prepare_async_sent_notifications_index.rb | 27 + ...30319105436_remove_member_role_download_code.rb | 7 + ..._add_index_to_vulnerability_findings_on_uuid.rb | 19 + ...0230320155635_add_index_to_namespace_details.rb | 17 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 68 + ...m_bigint_backfill_is_finished_for_gl_dot_com.rb | 29 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 74 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 68 + ...amespaces_broadcast_messages_namespace_id_fk.rb | 20 + ...124837_remove_ci_builds_partition_id_default.rb | 13 + ...ge_id_created_at_desc_index_to_package_files.rb | 15 + ...30321153337_cleanup_ml_candidates_iid_rename.rb | 13 + ...47_cleanup_conversion_big_int_ci_build_needs.rb | 15 + ...0321163947_backfill_ml_candidates_project_id.rb | 23 + ...321170823_backfill_ml_candidates_internal_id.rb | 21 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 74 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ..._user_namespace_records_from_vsa_aggregation.rb | 26 + ...alidate_partitioning_constraint_on_ci_builds.rb | 12 + ..._bigint_conversion_for_merge_request_metrics.rb | 29 + .../20230322203927_change_user_type_default.rb | 13 + ...iff_note_id_convert_to_bigint_for_gitlab_com.rb | 30 + ...iff_note_id_convert_to_bigint_for_gitlab_com.rb | 43 + ...iff_note_id_convert_to_bigint_for_gitlab_com.rb | 27 + ...31521_remove_machine_id_from_builds_metadata.rb | 22 + ...3433_fix_application_setting_push_rule_id_fk.rb | 20 + ...rability_finding_signatures_on_signature_sha.rb | 15 + ...152_remove_ci_builds_partition_id_default_v2.rb | 13 + ...ard_emoji_awardable_id_for_bigint_conversion.rb | 16 + ...kfill_events_target_id_for_bigint_conversion.rb | 16 + ...0230328100534_truncate_error_tracking_tables.rb | 20 + ..._security_scans_on_pipeline_id_and_scan_type.rb | 16 + ...328184031_swap_sent_notifications_id_columns.rb | 59 + ...29091107_truncate_p_ci_runner_machine_builds.rb | 14 + ...swap_ci_runner_machine_builds_primary_key_v2.rb | 46 + ...0329100222_drop_software_licenses_temp_index.rb | 16 + ...ve_tmp_index_vuln_occurrences_on_report_type.rb | 13 + .../20230330103104_reschedule_migrate_evidences.rb | 30 + ...f_files_note_id_to_bigint_for_gitlab_dot_com.rb | 68 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 8 + ...partial_index_on_vulnerability_report_types2.rb | 17 + ...partial_index_on_vulnerability_report_types2.rb | 16 + ...527_add_index_to_security_scans_on_scan_type.rb | 18 + ...8_resync_scan_result_policies_for_namespaces.rb | 77 + ...ons_note_id_convert_to_bigint_for_gitlab_com.rb | 31 + ...ons_note_id_convert_to_bigint_for_gitlab_com.rb | 43 + ...ons_note_id_convert_to_bigint_for_gitlab_com.rb | 27 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...estions_note_id_to_bigint_for_gitlab_dot_com.rb | 60 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...entions_note_id_to_bigint_for_gitlab_dot_com.rb | 74 + ...ex_ci_job_artifacts_on_expire_at_for_removal.rb | 14 + ...414_remove_unused_merge_request_jira_indexes.rb | 29 + ...ex_ci_job_artifacts_on_expire_at_for_removal.rb | 19 + ...prepare_async_index_for_override_uuids_logic.rb | 15 + ...20230404194907_remove_mr_mentions_temp_index.rb | 14 + ...20230404194908_remove_mr_state_id_temp_index.rb | 14 + ...ve_p_ci_builds_metadata_partition_id_default.rb | 13 + ...ide_uuids_logic_on_vulnerability_occurrences.rb | 17 + ..._saml_provider_and_identities_non_root_group.rb | 34 + ..._scim_token_and_scim_identity_non_root_group.rb | 34 + ...8_requeue_backfill_project_wiki_repositories.rb | 29 + ...l_file_md5_to_debian_project_component_files.rb | 11 + ...ull_file_md5_to_debian_group_component_files.rb | 11 + ..._admin_mode_scope_for_personal_access_tokens.rb | 23 + ...111251_async_validate_fk_projects_creator_id.rb | 15 + ...nup_bigint_conversion_for_sent_notifications.rb | 16 + ...gint_backfill_is_finished_for_gitlab_dot_com.rb | 29 + ...xt_limit_to_ci_job_artifacts_file_final_path.rb | 21 + ...emove_clusters_applications_cert_managers_fk.rb | 16 + ...01528_remove_clusters_applications_cilium_fk.rb | 16 + ...9_remove_clusters_applications_crossplane_fk.rb | 16 + ...2201549_remove_clusters_applications_helm_fk.rb | 16 + ...1600_remove_clusters_applications_ingress_fk.rb | 16 + ...1611_remove_clusters_applications_jupyter_fk.rb | 16 + ...1621_remove_clusters_applications_knative_fk.rb | 16 + ...2_remove_clusters_applications_prometheus_fk.rb | 16 + ...1642_remove_clusters_applications_runners_fk.rb | 16 + ...emove_clusters_applications_jupyter_oauth_fk.rb | 16 + ...43_remove_serverless_domain_cluster_pages_fk.rb | 16 + ..._remove_serverless_domain_cluster_knative_fk.rb | 16 + ..._remove_serverless_domain_cluster_creator_fk.rb | 16 + ...0412214119_finalize_encrypt_ci_trigger_token.rb | 23 + ..._merge_requests_on_state_id_and_merge_status.rb | 15 + ...tions_note_id_to_bigint_for_gitlab_dot_com_2.rb | 93 + ...ata_note_id_convert_to_bigint_for_gitlab_com.rb | 30 + ...ata_note_id_convert_to_bigint_for_gitlab_com.rb | 43 + ...ata_note_id_convert_to_bigint_for_gitlab_com.rb | 27 + ..._add_namespaces_by_top_level_namespace_index.rb | 15 + ...de_suggestions_default_in_namespace_settings.rb | 7 + ...date_code_suggestions_for_namespace_settings.rb | 12 + ...gestions_default_false_in_namespace_settings.rb | 7 + db/schema_migrations/20210826171758 | 1 - db/schema_migrations/20210826193907 | 1 - db/schema_migrations/20210830085837 | 1 - db/schema_migrations/20210830104800 | 1 - db/schema_migrations/20210830140524 | 1 - db/schema_migrations/20210830154358 | 1 - db/schema_migrations/20210831123008 | 1 - db/schema_migrations/20210831134840 | 1 - db/schema_migrations/20210831135249 | 1 - db/schema_migrations/20210831203408 | 1 - db/schema_migrations/20210901044202 | 1 - db/schema_migrations/20210901044237 | 1 - db/schema_migrations/20210901065504 | 1 - db/schema_migrations/20210901153324 | 1 - db/schema_migrations/20210901184511 | 1 - db/schema_migrations/20210902144144 | 1 - db/schema_migrations/20210902171406 | 1 - db/schema_migrations/20210902171808 | 1 - db/schema_migrations/20210902184334 | 1 - db/schema_migrations/20210903054158 | 1 - db/schema_migrations/20210906100021 | 1 - db/schema_migrations/20210906100316 | 1 - db/schema_migrations/20210906130643 | 1 - db/schema_migrations/20210907013944 | 1 - db/schema_migrations/20210907021940 | 1 - db/schema_migrations/20210907033745 | 1 - db/schema_migrations/20210907041000 | 1 - db/schema_migrations/20210907182337 | 1 - db/schema_migrations/20210907182359 | 1 - db/schema_migrations/20210907211557 | 1 - db/schema_migrations/20210908060951 | 1 - db/schema_migrations/20210908061132 | 1 - db/schema_migrations/20210908100810 | 1 - db/schema_migrations/20210908132335 | 1 - db/schema_migrations/20210908140437 | 1 - db/schema_migrations/20210908185736 | 1 - db/schema_migrations/20210908185754 | 1 - db/schema_migrations/20210908195506 | 1 - db/schema_migrations/20210909104800 | 1 - db/schema_migrations/20210909152027 | 1 - db/schema_migrations/20210909184349 | 1 - db/schema_migrations/20210910014741 | 1 - db/schema_migrations/20210910015047 | 1 - db/schema_migrations/20210910141043 | 1 - db/schema_migrations/20210910192921 | 1 - db/schema_migrations/20210910194952 | 1 - db/schema_migrations/20210912034903 | 1 - db/schema_migrations/20210913010411 | 1 - db/schema_migrations/20210913010432 | 1 - db/schema_migrations/20210913122457 | 1 - db/schema_migrations/20210913224558 | 1 - db/schema_migrations/20210914094840 | 1 - db/schema_migrations/20210914095310 | 1 - db/schema_migrations/20210914145810 | 1 - db/schema_migrations/20210914172202 | 1 - db/schema_migrations/20210915000453 | 1 - db/schema_migrations/20210915001242 | 1 - db/schema_migrations/20210915022415 | 1 - db/schema_migrations/20210915070423 | 1 - db/schema_migrations/20210915202900 | 1 - db/schema_migrations/20210916132547 | 1 - db/schema_migrations/20210917134321 | 1 - db/schema_migrations/20210917153645 | 1 - db/schema_migrations/20210917153905 | 1 - db/schema_migrations/20210917224419 | 1 - db/schema_migrations/20210918201050 | 1 - db/schema_migrations/20210918202855 | 1 - db/schema_migrations/20210920104446 | 1 - db/schema_migrations/20210920232025 | 1 - db/schema_migrations/20210921032008 | 1 - db/schema_migrations/20210921062820 | 1 - db/schema_migrations/20210921063924 | 1 - db/schema_migrations/20210921191010 | 1 - db/schema_migrations/20210922021816 | 1 - db/schema_migrations/20210922025631 | 1 - db/schema_migrations/20210922082019 | 1 - db/schema_migrations/20210922084115 | 1 - db/schema_migrations/20210922091402 | 1 - db/schema_migrations/20210922172056 | 1 - db/schema_migrations/20210922172156 | 1 - db/schema_migrations/20210922215740 | 1 - db/schema_migrations/20210922220104 | 1 - db/schema_migrations/20210923042323 | 1 - db/schema_migrations/20210923042324 | 1 - db/schema_migrations/20210923042325 | 1 - db/schema_migrations/20210923133143 | 1 - db/schema_migrations/20210923135909 | 1 - db/schema_migrations/20210923151641 | 1 - db/schema_migrations/20210923192648 | 1 - db/schema_migrations/20210923192649 | 1 - db/schema_migrations/20210927153807 | 1 - db/schema_migrations/20210928155022 | 1 - db/schema_migrations/20210928171122 | 1 - db/schema_migrations/20210929025600 | 1 - db/schema_migrations/20210929030834 | 1 - db/schema_migrations/20210929031049 | 1 - db/schema_migrations/20210929032555 | 1 - db/schema_migrations/20210929115340 | 1 - db/schema_migrations/20210929121516 | 1 - db/schema_migrations/20210929144453 | 1 - db/schema_migrations/20210930081208 | 1 - db/schema_migrations/20210930211936 | 1 - db/schema_migrations/20211001001222 | 1 - db/schema_migrations/20211004062942 | 1 - db/schema_migrations/20211004075629 | 1 - db/schema_migrations/20211004081911 | 1 - db/schema_migrations/20211004110500 | 1 - db/schema_migrations/20211004110927 | 1 - db/schema_migrations/20211004122540 | 1 - db/schema_migrations/20211004151202 | 1 - db/schema_migrations/20211005010101 | 1 - db/schema_migrations/20211005063519 | 1 - db/schema_migrations/20211005063616 | 1 - db/schema_migrations/20211005063723 | 1 - db/schema_migrations/20211005083015 | 1 - db/schema_migrations/20211005092428 | 1 - db/schema_migrations/20211005093558 | 1 - db/schema_migrations/20211005100112 | 1 - db/schema_migrations/20211005112404 | 1 - db/schema_migrations/20211005112645 | 1 - db/schema_migrations/20211005194425 | 1 - db/schema_migrations/20211006060254 | 1 - db/schema_migrations/20211006060436 | 1 - db/schema_migrations/20211006103122 | 1 - db/schema_migrations/20211006122010 | 1 - db/schema_migrations/20211006145004 | 1 - db/schema_migrations/20211006174114 | 1 - db/schema_migrations/20211007090229 | 1 - db/schema_migrations/20211007093340 | 1 - db/schema_migrations/20211007113136 | 1 - db/schema_migrations/20211007155221 | 1 - db/schema_migrations/20211008043855 | 1 - db/schema_migrations/20211008181451 | 1 - db/schema_migrations/20211008182954 | 1 - db/schema_migrations/20211008193137 | 1 - db/schema_migrations/20211011004242 | 1 - db/schema_migrations/20211011104843 | 1 - db/schema_migrations/20211011140930 | 1 - db/schema_migrations/20211011140931 | 1 - db/schema_migrations/20211011140932 | 1 - db/schema_migrations/20211011141239 | 1 - db/schema_migrations/20211011141242 | 1 - db/schema_migrations/20211011141243 | 1 - db/schema_migrations/20211011152701 | 1 - db/schema_migrations/20211012015903 | 1 - db/schema_migrations/20211012051221 | 1 - db/schema_migrations/20211012091822 | 1 - db/schema_migrations/20211012134316 | 1 - db/schema_migrations/20211012143815 | 1 - db/schema_migrations/20211012155931 | 1 - db/schema_migrations/20211013014228 | 1 - db/schema_migrations/20211013080714 | 1 - db/schema_migrations/20211013080715 | 1 - db/schema_migrations/20211013080716 | 1 - db/schema_migrations/20211013125341 | 1 - db/schema_migrations/20211013192749 | 1 - db/schema_migrations/20211015021114 | 1 - db/schema_migrations/20211015024135 | 1 - db/schema_migrations/20211018101034 | 1 - db/schema_migrations/20211018101552 | 1 - db/schema_migrations/20211018101852 | 1 - db/schema_migrations/20211018102252 | 1 - db/schema_migrations/20211018123316 | 1 - db/schema_migrations/20211018152654 | 1 - db/schema_migrations/20211018161447 | 1 - db/schema_migrations/20211019153615 | 1 - db/schema_migrations/20211020030948 | 1 - db/schema_migrations/20211020095357 | 1 - db/schema_migrations/20211021115409 | 1 - db/schema_migrations/20211021124715 | 1 - db/schema_migrations/20211021125908 | 1 - db/schema_migrations/20211021131217 | 1 - db/schema_migrations/20211021134458 | 1 - db/schema_migrations/20211021140426 | 1 - db/schema_migrations/20211021141930 | 1 - db/schema_migrations/20211022112202 | 1 - db/schema_migrations/20211022113000 | 1 - db/schema_migrations/20211022160154 | 1 - db/schema_migrations/20211022214523 | 1 - db/schema_migrations/20211023102243 | 1 - db/schema_migrations/20211025103744 | 1 - db/schema_migrations/20211025103758 | 1 - db/schema_migrations/20211026070408 | 1 - db/schema_migrations/20211026124336 | 1 - db/schema_migrations/20211026143238 | 1 - db/schema_migrations/20211027043206 | 1 - db/schema_migrations/20211027043229 | 1 - db/schema_migrations/20211027064021 | 1 - db/schema_migrations/20211027064156 | 1 - db/schema_migrations/20211027112901 | 1 - db/schema_migrations/20211027203950 | 1 - db/schema_migrations/20211027204011 | 1 - db/schema_migrations/20211028085926 | 1 - db/schema_migrations/20211028100303 | 1 - db/schema_migrations/20211028100843 | 1 - db/schema_migrations/20211028123412 | 1 - db/schema_migrations/20211028132247 | 1 - db/schema_migrations/20211028155449 | 1 - db/schema_migrations/20211028212259 | 1 - db/schema_migrations/20211029102822 | 1 - db/schema_migrations/20211031152417 | 1 - db/schema_migrations/20211031154919 | 1 - db/schema_migrations/20211101132310 | 1 - db/schema_migrations/20211101165656 | 1 - db/schema_migrations/20211101222614 | 1 - db/schema_migrations/20211102103127 | 1 - db/schema_migrations/20211102114802 | 1 - db/schema_migrations/20211103062728 | 1 - db/schema_migrations/20211103141403 | 1 - db/schema_migrations/20211103162025 | 1 - db/schema_migrations/20211103184303 | 1 - db/schema_migrations/20211104012209 | 1 - db/schema_migrations/20211104044453 | 1 - db/schema_migrations/20211104165220 | 1 - db/schema_migrations/20211105010101 | 1 - db/schema_migrations/20211105125756 | 1 - db/schema_migrations/20211105125813 | 1 - db/schema_migrations/20211105135157 | 1 - db/schema_migrations/20211105160316 | 1 - db/schema_migrations/20211105161404 | 1 - db/schema_migrations/20211108154510 | 1 - db/schema_migrations/20211108154841 | 1 - db/schema_migrations/20211108203248 | 1 - db/schema_migrations/20211108204736 | 1 - db/schema_migrations/20211108211434 | 1 - db/schema_migrations/20211109100050 | 1 - db/schema_migrations/20211109101010 | 1 - db/schema_migrations/20211109112454 | 1 - db/schema_migrations/20211110010101 | 1 - db/schema_migrations/20211110014701 | 1 - db/schema_migrations/20211110015252 | 1 - db/schema_migrations/20211110092710 | 1 - db/schema_migrations/20211110100050 | 1 - db/schema_migrations/20211110143306 | 1 - db/schema_migrations/20211110151320 | 1 - db/schema_migrations/20211110151350 | 1 - db/schema_migrations/20211111112425 | 1 - db/schema_migrations/20211111112639 | 1 - db/schema_migrations/20211111112713 | 1 - db/schema_migrations/20211111164025 | 1 - db/schema_migrations/20211111164047 | 1 - db/schema_migrations/20211112073413 | 1 - db/schema_migrations/20211112113300 | 1 - db/schema_migrations/20211112155416 | 1 - db/schema_migrations/20211115132613 | 1 - db/schema_migrations/20211115142803 | 1 - db/schema_migrations/20211115142847 | 1 - db/schema_migrations/20211115142911 | 1 - db/schema_migrations/20211115145107 | 1 - db/schema_migrations/20211115151704 | 1 - db/schema_migrations/20211115154103 | 1 - db/schema_migrations/20211116091751 | 1 - db/schema_migrations/20211116093739 | 1 - db/schema_migrations/20211116111644 | 1 - db/schema_migrations/20211117084814 | 1 - db/schema_migrations/20211117174209 | 1 - db/schema_migrations/20211118100959 | 1 - db/schema_migrations/20211118103439 | 1 - db/schema_migrations/20211118114228 | 1 - db/schema_migrations/20211118124537 | 1 - db/schema_migrations/20211118124628 | 1 - db/schema_migrations/20211118124650 | 1 - db/schema_migrations/20211118130836 | 1 - db/schema_migrations/20211118194239 | 1 - db/schema_migrations/20211119085015 | 1 - db/schema_migrations/20211119085036 | 1 - db/schema_migrations/20211119111006 | 1 - db/schema_migrations/20211119154221 | 1 - db/schema_migrations/20211119170805 | 1 - db/schema_migrations/20211119194024 | 1 - db/schema_migrations/20211119195201 | 1 - db/schema_migrations/20211122033501 | 1 - db/schema_migrations/20211122103051 | 1 - db/schema_migrations/20211122193948 | 1 - db/schema_migrations/20211122215001 | 1 - db/schema_migrations/20211123135255 | 1 - db/schema_migrations/20211123161906 | 1 - db/schema_migrations/20211123181236 | 1 - db/schema_migrations/20211123182614 | 1 - db/schema_migrations/20211124095704 | 1 - db/schema_migrations/20211124132319 | 1 - db/schema_migrations/20211124132705 | 1 - db/schema_migrations/20211125120444 | 1 - db/schema_migrations/20211126042235 | 1 - db/schema_migrations/20211126113029 | 1 - db/schema_migrations/20211126115449 | 1 - db/schema_migrations/20211126142200 | 1 - db/schema_migrations/20211126142354 | 1 - db/schema_migrations/20211126204445 | 1 - db/schema_migrations/20211129151155 | 1 - db/schema_migrations/20211129151832 | 1 - db/schema_migrations/20211130151724 | 1 - db/schema_migrations/20211130165043 | 1 - db/schema_migrations/20211130201100 | 1 - db/schema_migrations/20211130201101 | 1 - db/schema_migrations/20211130205719 | 1 - db/schema_migrations/20211201061733 | 1 - db/schema_migrations/20211201101541 | 1 - db/schema_migrations/20211201143042 | 1 - db/schema_migrations/20211202041233 | 1 - db/schema_migrations/20211202094944 | 1 - db/schema_migrations/20211202135508 | 1 - db/schema_migrations/20211202145237 | 1 - db/schema_migrations/20211203091642 | 1 - db/schema_migrations/20211203160952 | 1 - db/schema_migrations/20211203161149 | 1 - db/schema_migrations/20211203161840 | 1 - db/schema_migrations/20211203161942 | 1 - db/schema_migrations/20211204010826 | 1 - db/schema_migrations/20211206073851 | 1 - db/schema_migrations/20211206074547 | 1 - db/schema_migrations/20211206161271 | 1 - db/schema_migrations/20211207081708 | 1 - db/schema_migrations/20211207090503 | 1 - db/schema_migrations/20211207125331 | 1 - db/schema_migrations/20211207135331 | 1 - db/schema_migrations/20211207154413 | 1 - db/schema_migrations/20211207154414 | 1 - db/schema_migrations/20211207165508 | 1 - db/schema_migrations/20211207173510 | 1 - db/schema_migrations/20211207173511 | 1 - db/schema_migrations/20211208111425 | 1 - db/schema_migrations/20211208122200 | 1 - db/schema_migrations/20211208122201 | 1 - db/schema_migrations/20211208171402 | 1 - db/schema_migrations/20211209093636 | 1 - db/schema_migrations/20211209093828 | 1 - db/schema_migrations/20211209093923 | 1 - db/schema_migrations/20211209094222 | 1 - db/schema_migrations/20211209103048 | 1 - db/schema_migrations/20211209203820 | 1 - db/schema_migrations/20211209203821 | 1 - db/schema_migrations/20211209230042 | 1 - db/schema_migrations/20211210025754 | 1 - db/schema_migrations/20211210031721 | 1 - db/schema_migrations/20211210140000 | 1 - db/schema_migrations/20211210140629 | 1 - db/schema_migrations/20211210173137 | 1 - db/schema_migrations/20211213064821 | 1 - db/schema_migrations/20211213102111 | 1 - db/schema_migrations/20211213130324 | 1 - db/schema_migrations/20211213142344 | 1 - db/schema_migrations/20211213154259 | 1 - db/schema_migrations/20211213154704 | 1 - db/schema_migrations/20211214012507 | 1 - db/schema_migrations/20211214110307 | 1 - db/schema_migrations/20211215090620 | 1 - db/schema_migrations/20211215182006 | 1 - db/schema_migrations/20211216133107 | 1 - db/schema_migrations/20211216134134 | 1 - db/schema_migrations/20211216135651 | 1 - db/schema_migrations/20211216220939 | 1 - db/schema_migrations/20211217050753 | 1 - db/schema_migrations/20211217120000 | 1 - db/schema_migrations/20211217145923 | 1 - db/schema_migrations/20211217174331 | 1 - db/schema_migrations/20211220064757 | 1 - db/schema_migrations/20211220120402 | 1 - db/schema_migrations/20211220123956 | 1 - db/schema_migrations/20211220174504 | 1 - db/schema_migrations/20211223125921 | 1 - db/schema_migrations/20211224112937 | 1 - db/schema_migrations/20211224114539 | 1 - db/schema_migrations/20211229023654 | 1 - db/schema_migrations/20211230112517 | 1 - db/schema_migrations/20211230113031 | 1 - db/schema_migrations/20220104060049 | 1 - db/schema_migrations/20220104174445 | 1 - db/schema_migrations/20220105020514 | 1 - db/schema_migrations/20220105082217 | 1 - db/schema_migrations/20220105121325 | 1 - db/schema_migrations/20220105152547 | 1 - db/schema_migrations/20220105153149 | 1 - db/schema_migrations/20220106111958 | 1 - db/schema_migrations/20220106112043 | 1 - db/schema_migrations/20220106112085 | 1 - db/schema_migrations/20220106141756 | 1 - db/schema_migrations/20220106163326 | 1 - db/schema_migrations/20220106185033 | 1 - db/schema_migrations/20220106230629 | 1 - db/schema_migrations/20220106230712 | 1 - db/schema_migrations/20220106231518 | 1 - db/schema_migrations/20220106233459 | 1 - db/schema_migrations/20220106235626 | 1 - db/schema_migrations/20220107064845 | 1 - db/schema_migrations/20220107091629 | 1 - db/schema_migrations/20220107165036 | 1 - db/schema_migrations/20220109133006 | 1 - db/schema_migrations/20220109134455 | 1 - db/schema_migrations/20220110170953 | 1 - db/schema_migrations/20220110171049 | 1 - db/schema_migrations/20220110224913 | 1 - db/schema_migrations/20220110231420 | 1 - db/schema_migrations/20220110233155 | 1 - db/schema_migrations/20220111002756 | 1 - db/schema_migrations/20220111023852 | 1 - db/schema_migrations/20220111093534 | 1 - db/schema_migrations/20220111095006 | 1 - db/schema_migrations/20220111095007 | 1 - db/schema_migrations/20220111101421 | 1 - db/schema_migrations/20220111102314 | 1 - db/schema_migrations/20220111154950 | 1 - db/schema_migrations/20220111154951 | 1 - db/schema_migrations/20220111200254 | 1 - db/schema_migrations/20220111221516 | 1 - db/schema_migrations/20220112015940 | 1 - db/schema_migrations/20220112090556 | 1 - db/schema_migrations/20220112115413 | 1 - db/schema_migrations/20220112205111 | 1 - db/schema_migrations/20220112230642 | 1 - db/schema_migrations/20220112232037 | 1 - db/schema_migrations/20220112232605 | 1 - db/schema_migrations/20220112232723 | 1 - db/schema_migrations/20220113013319 | 1 - db/schema_migrations/20220113014438 | 1 - db/schema_migrations/20220113015830 | 1 - db/schema_migrations/20220113035519 | 1 - db/schema_migrations/20220113040447 | 1 - db/schema_migrations/20220113111440 | 1 - db/schema_migrations/20220113125401 | 1 - db/schema_migrations/20220113135449 | 1 - db/schema_migrations/20220113135924 | 1 - db/schema_migrations/20220113164801 | 1 - db/schema_migrations/20220113164901 | 1 - db/schema_migrations/20220114105525 | 1 - db/schema_migrations/20220114131950 | 1 - db/schema_migrations/20220116175851 | 1 - db/schema_migrations/20220117034056 | 1 - db/schema_migrations/20220117082611 | 1 - db/schema_migrations/20220117225936 | 1 - db/schema_migrations/20220118015633 | 1 - db/schema_migrations/20220118020026 | 1 - db/schema_migrations/20220118141950 | 1 - db/schema_migrations/20220118155846 | 1 - db/schema_migrations/20220118155847 | 1 - db/schema_migrations/20220118155848 | 1 - db/schema_migrations/20220118204039 | 1 - db/schema_migrations/20220119094023 | 1 - db/schema_migrations/20220119094503 | 1 - db/schema_migrations/20220119141407 | 1 - db/schema_migrations/20220119141736 | 1 - db/schema_migrations/20220119143130 | 1 - db/schema_migrations/20220119144253 | 1 - db/schema_migrations/20220119144458 | 1 - db/schema_migrations/20220119151221 | 1 - db/schema_migrations/20220119153706 | 1 - db/schema_migrations/20220119154442 | 1 - db/schema_migrations/20220119170426 | 1 - db/schema_migrations/20220119193130 | 1 - db/schema_migrations/20220119201340 | 1 - db/schema_migrations/20220119203119 | 1 - db/schema_migrations/20220119220620 | 1 - db/schema_migrations/20220120033115 | 1 - db/schema_migrations/20220120085655 | 1 - db/schema_migrations/20220120094340 | 1 - db/schema_migrations/20220120123700 | 1 - db/schema_migrations/20220120123800 | 1 - db/schema_migrations/20220120160625 | 1 - db/schema_migrations/20220120211831 | 1 - db/schema_migrations/20220120211832 | 1 - db/schema_migrations/20220121214752 | 1 - db/schema_migrations/20220121214753 | 1 - db/schema_migrations/20220121221651 | 1 - db/schema_migrations/20220124130028 | 1 - db/schema_migrations/20220124145019 | 1 - db/schema_migrations/20220124151456 | 1 - db/schema_migrations/20220124151949 | 1 - db/schema_migrations/20220124152824 | 1 - db/schema_migrations/20220124153233 | 1 - db/schema_migrations/20220124153234 | 1 - db/schema_migrations/20220124180704 | 1 - db/schema_migrations/20220124180705 | 1 - db/schema_migrations/20220124184338 | 1 - db/schema_migrations/20220124200927 | 1 - db/schema_migrations/20220124204046 | 1 - db/schema_migrations/20220124214131 | 1 - db/schema_migrations/20220124215857 | 1 - db/schema_migrations/20220124221521 | 1 - db/schema_migrations/20220125083520 | 1 - db/schema_migrations/20220125084127 | 1 - db/schema_migrations/20220125084348 | 1 - db/schema_migrations/20220125122228 | 1 - db/schema_migrations/20220125122640 | 1 - db/schema_migrations/20220125122725 | 1 - db/schema_migrations/20220125230538 | 1 - db/schema_migrations/20220126191624 | 1 - db/schema_migrations/20220126201752 | 1 - db/schema_migrations/20220126202654 | 1 - db/schema_migrations/20220126203421 | 1 - db/schema_migrations/20220126210021 | 1 - db/schema_migrations/20220126210022 | 1 - db/schema_migrations/20220126210657 | 1 - db/schema_migrations/20220127112243 | 1 - db/schema_migrations/20220127112412 | 1 - db/schema_migrations/20220127132200 | 1 - db/schema_migrations/20220127132201 | 1 - db/schema_migrations/20220128093756 | 1 - db/schema_migrations/20220128103042 | 1 - db/schema_migrations/20220128155251 | 1 - db/schema_migrations/20220128155814 | 1 - db/schema_migrations/20220128194722 | 1 - db/schema_migrations/20220131000000 | 1 - db/schema_migrations/20220131000001 | 1 - db/schema_migrations/20220131135725 | 1 - db/schema_migrations/20220131192643 | 1 - db/schema_migrations/20220201034731 | 1 - db/schema_migrations/20220201141705 | 1 - db/schema_migrations/20220201173212 | 1 - db/schema_migrations/20220201193033 | 1 - db/schema_migrations/20220201205300 | 1 - db/schema_migrations/20220202034409 | 1 - db/schema_migrations/20220202105733 | 1 - db/schema_migrations/20220202115350 | 1 - db/schema_migrations/20220203074916 | 1 - db/schema_migrations/20220203091304 | 1 - db/schema_migrations/20220203123333 | 1 - db/schema_migrations/20220203133652 | 1 - db/schema_migrations/20220203134942 | 1 - db/schema_migrations/20220204053655 | 1 - db/schema_migrations/20220204093120 | 1 - db/schema_migrations/20220204095121 | 1 - db/schema_migrations/20220204110725 | 1 - db/schema_migrations/20220204154220 | 1 - db/schema_migrations/20220204193000 | 1 - db/schema_migrations/20220204194347 | 1 - db/schema_migrations/20220207080758 | 1 - db/schema_migrations/20220207083129 | 1 - db/schema_migrations/20220208080921 | 1 - db/schema_migrations/20220208115439 | 1 - db/schema_migrations/20220208170445 | 1 - db/schema_migrations/20220208171826 | 1 - db/schema_migrations/20220209111007 | 1 - db/schema_migrations/20220211090920 | 1 - db/schema_migrations/20220211125954 | 1 - db/schema_migrations/20220211214605 | 1 - db/schema_migrations/20220212120735 | 1 - db/schema_migrations/20220213100000 | 1 - db/schema_migrations/20220213103859 | 1 - db/schema_migrations/20220213104531 | 1 - db/schema_migrations/20220215164709 | 1 - db/schema_migrations/20220215190020 | 1 - db/schema_migrations/20220216110023 | 1 - db/schema_migrations/20220216201949 | 1 - db/schema_migrations/20220217100008 | 1 - db/schema_migrations/20220217113058 | 1 - db/schema_migrations/20220217135229 | 1 - db/schema_migrations/20220221102333 | 1 - db/schema_migrations/20220221214928 | 1 - db/schema_migrations/20220222072536 | 1 - db/schema_migrations/20220222191845 | 1 - db/schema_migrations/20220222192524 | 1 - db/schema_migrations/20220222192525 | 1 - db/schema_migrations/20220223112304 | 1 - db/schema_migrations/20220223124428 | 1 - db/schema_migrations/20220224000000 | 1 - db/schema_migrations/20220224204415 | 1 - db/schema_migrations/20220225133705 | 1 - db/schema_migrations/20220301002101 | 1 - db/schema_migrations/20220301003502 | 1 - db/schema_migrations/20220301091503 | 1 - db/schema_migrations/20220301093434 | 1 - db/schema_migrations/20220301175104 | 1 - db/schema_migrations/20220301175426 | 1 - db/schema_migrations/20220302110724 | 1 - db/schema_migrations/20220302114046 | 1 - db/schema_migrations/20220302203410 | 1 - db/schema_migrations/20220303190555 | 1 - db/schema_migrations/20220303191047 | 1 - db/schema_migrations/20220304052335 | 1 - db/schema_migrations/20220304061631 | 1 - db/schema_migrations/20220304062107 | 1 - db/schema_migrations/20220304152729 | 1 - db/schema_migrations/20220304165107 | 1 - db/schema_migrations/20220304201847 | 1 - db/schema_migrations/20220305223212 | 1 - db/schema_migrations/20220307192534 | 1 - db/schema_migrations/20220307192610 | 1 - db/schema_migrations/20220307192645 | 1 - db/schema_migrations/20220307192725 | 1 - db/schema_migrations/20220307203458 | 1 - db/schema_migrations/20220307203459 | 1 - db/schema_migrations/20220308000205 | 1 - db/schema_migrations/20220308115219 | 1 - db/schema_migrations/20220308115502 | 1 - db/schema_migrations/20220309084838 | 1 - db/schema_migrations/20220309084954 | 1 - db/schema_migrations/20220309100648 | 1 - db/schema_migrations/20220309154855 | 1 - db/schema_migrations/20220310011530 | 1 - db/schema_migrations/20220310011613 | 1 - db/schema_migrations/20220310095341 | 1 - db/schema_migrations/20220310101118 | 1 - db/schema_migrations/20220310134207 | 1 - db/schema_migrations/20220310141349 | 1 - db/schema_migrations/20220311010352 | 1 - db/schema_migrations/20220314094841 | 1 - db/schema_migrations/20220314154235 | 1 - db/schema_migrations/20220314162342 | 1 - db/schema_migrations/20221229172604 | 1 + db/schema_migrations/20230127024835 | 1 + db/schema_migrations/20230207002330 | 1 + db/schema_migrations/20230209222452 | 1 + db/schema_migrations/20230221093535 | 1 + db/schema_migrations/20230221093536 | 1 + db/schema_migrations/20230222161226 | 1 + db/schema_migrations/20230222161954 | 1 + db/schema_migrations/20230228183644 | 1 + db/schema_migrations/20230301020246 | 1 + db/schema_migrations/20230301020356 | 1 + db/schema_migrations/20230303232426 | 1 + db/schema_migrations/20230307000000 | 1 + db/schema_migrations/20230307132729 | 1 + db/schema_migrations/20230307212637 | 1 + db/schema_migrations/20230308154243 | 1 + db/schema_migrations/20230308154244 | 1 + db/schema_migrations/20230308154245 | 1 + db/schema_migrations/20230309085547 | 1 + db/schema_migrations/20230313012226 | 1 + db/schema_migrations/20230313012609 | 1 + db/schema_migrations/20230313014038 | 1 + db/schema_migrations/20230313031351 | 1 + db/schema_migrations/20230313031629 | 1 + db/schema_migrations/20230313142631 | 1 + db/schema_migrations/20230313181536 | 1 + db/schema_migrations/20230314144640 | 1 + db/schema_migrations/20230314210657 | 1 + db/schema_migrations/20230315053635 | 1 + db/schema_migrations/20230315084704 | 1 + db/schema_migrations/20230315161408 | 1 + db/schema_migrations/20230316014651 | 1 + db/schema_migrations/20230316093433 | 1 + db/schema_migrations/20230316095948 | 1 + db/schema_migrations/20230316114426 | 1 + db/schema_migrations/20230316164917 | 1 + db/schema_migrations/20230316185746 | 1 + db/schema_migrations/20230317075852 | 1 + db/schema_migrations/20230317080000 | 1 + db/schema_migrations/20230317080137 | 1 + db/schema_migrations/20230317151841 | 1 + db/schema_migrations/20230317162059 | 1 + db/schema_migrations/20230317195228 | 1 + db/schema_migrations/20230319105436 | 1 + db/schema_migrations/20230320110802 | 1 + db/schema_migrations/20230320155635 | 1 + db/schema_migrations/20230321003252 | 1 + db/schema_migrations/20230321011529 | 1 + db/schema_migrations/20230321011903 | 1 + db/schema_migrations/20230321024333 | 1 + db/schema_migrations/20230321024903 | 1 + db/schema_migrations/20230321085011 | 1 + db/schema_migrations/20230321095759 | 1 + db/schema_migrations/20230321113956 | 1 + db/schema_migrations/20230321124837 | 1 + db/schema_migrations/20230321153035 | 1 + db/schema_migrations/20230321153304 | 1 + db/schema_migrations/20230321153337 | 1 + db/schema_migrations/20230321161218 | 1 + db/schema_migrations/20230321161441 | 1 + db/schema_migrations/20230321162810 | 1 + db/schema_migrations/20230321162902 | 1 + db/schema_migrations/20230321163051 | 1 + db/schema_migrations/20230321163547 | 1 + db/schema_migrations/20230321163947 | 1 + db/schema_migrations/20230321170734 | 1 + db/schema_migrations/20230321170803 | 1 + db/schema_migrations/20230321170823 | 1 + db/schema_migrations/20230322011220 | 1 + db/schema_migrations/20230322012209 | 1 + db/schema_migrations/20230322023442 | 1 + db/schema_migrations/20230322085041 | 1 + db/schema_migrations/20230322085852 | 1 + db/schema_migrations/20230322145403 | 1 + db/schema_migrations/20230322151605 | 1 + db/schema_migrations/20230322151635 | 1 + db/schema_migrations/20230322162512 | 1 + db/schema_migrations/20230322203927 | 1 + db/schema_migrations/20230323005730 | 1 + db/schema_migrations/20230323010111 | 1 + db/schema_migrations/20230323013251 | 1 + db/schema_migrations/20230323021618 | 1 + db/schema_migrations/20230323101138 | 1 + db/schema_migrations/20230323120601 | 1 + db/schema_migrations/20230323131521 | 1 + db/schema_migrations/20230323140745 | 1 + db/schema_migrations/20230323140746 | 1 + db/schema_migrations/20230323153042 | 1 + db/schema_migrations/20230323153328 | 1 + db/schema_migrations/20230323153433 | 1 + db/schema_migrations/20230323191750 | 1 + db/schema_migrations/20230327074932 | 1 + db/schema_migrations/20230327123333 | 1 + db/schema_migrations/20230327125705 | 1 + db/schema_migrations/20230327144152 | 1 + db/schema_migrations/20230328020316 | 1 + db/schema_migrations/20230328023535 | 1 + db/schema_migrations/20230328023554 | 1 + db/schema_migrations/20230328031720 | 1 + db/schema_migrations/20230328031838 | 1 + db/schema_migrations/20230328100534 | 1 + db/schema_migrations/20230328151756 | 1 + db/schema_migrations/20230328184031 | 1 + db/schema_migrations/20230329032129 | 1 + db/schema_migrations/20230329085754 | 1 + db/schema_migrations/20230329091107 | 1 + db/schema_migrations/20230329091300 | 1 + db/schema_migrations/20230329100222 | 1 + db/schema_migrations/20230329152410 | 1 + db/schema_migrations/20230329194244 | 1 + db/schema_migrations/20230330080731 | 1 + db/schema_migrations/20230330101438 | 1 + db/schema_migrations/20230330101439 | 1 + db/schema_migrations/20230330101440 | 1 + db/schema_migrations/20230330101441 | 1 + db/schema_migrations/20230330101442 | 1 + db/schema_migrations/20230330101443 | 1 + db/schema_migrations/20230330103104 | 1 + db/schema_migrations/20230330215636 | 1 + db/schema_migrations/20230331142006 | 1 + db/schema_migrations/20230403023440 | 1 + db/schema_migrations/20230403023441 | 1 + db/schema_migrations/20230403023828 | 1 + db/schema_migrations/20230403041642 | 1 + db/schema_migrations/20230403041917 | 1 + db/schema_migrations/20230403085957 | 1 + db/schema_migrations/20230403085958 | 1 + db/schema_migrations/20230403113620 | 1 + db/schema_migrations/20230403145705 | 1 + db/schema_migrations/20230403164454 | 1 + db/schema_migrations/20230403190527 | 1 + db/schema_migrations/20230403221928 | 1 + db/schema_migrations/20230403231455 | 1 + db/schema_migrations/20230403231841 | 1 + db/schema_migrations/20230403232121 | 1 + db/schema_migrations/20230404023648 | 1 + db/schema_migrations/20230404023915 | 1 + db/schema_migrations/20230404030757 | 1 + db/schema_migrations/20230404031041 | 1 + db/schema_migrations/20230404044338 | 1 + db/schema_migrations/20230404050414 | 1 + db/schema_migrations/20230404061832 | 1 + db/schema_migrations/20230404132544 | 1 + db/schema_migrations/20230404194907 | 1 + db/schema_migrations/20230404194908 | 1 + db/schema_migrations/20230405072302 | 1 + db/schema_migrations/20230405094230 | 1 + db/schema_migrations/20230405102815 | 1 + db/schema_migrations/20230405132104 | 1 + db/schema_migrations/20230405132855 | 1 + db/schema_migrations/20230405200858 | 1 + db/schema_migrations/20230406040908 | 1 + db/schema_migrations/20230406041555 | 1 + db/schema_migrations/20230406041629 | 1 + db/schema_migrations/20230406042906 | 1 + db/schema_migrations/20230406043900 | 1 + db/schema_migrations/20230406060452 | 1 + db/schema_migrations/20230406073847 | 1 + db/schema_migrations/20230406093640 | 1 + db/schema_migrations/20230406095544 | 1 + db/schema_migrations/20230406134436 | 1 + db/schema_migrations/20230406150254 | 1 + db/schema_migrations/20230406150354 | 1 + db/schema_migrations/20230406150454 | 1 + db/schema_migrations/20230407164616 | 1 + db/schema_migrations/20230410092450 | 1 + db/schema_migrations/20230410111251 | 1 + db/schema_migrations/20230411153310 | 1 + db/schema_migrations/20230411171001 | 1 + db/schema_migrations/20230412013251 | 1 + db/schema_migrations/20230412073614 | 1 + db/schema_migrations/20230412080242 | 1 + db/schema_migrations/20230412151659 | 1 + db/schema_migrations/20230412152538 | 1 + db/schema_migrations/20230412201517 | 1 + db/schema_migrations/20230412201528 | 1 + db/schema_migrations/20230412201539 | 1 + db/schema_migrations/20230412201549 | 1 + db/schema_migrations/20230412201600 | 1 + db/schema_migrations/20230412201611 | 1 + db/schema_migrations/20230412201621 | 1 + db/schema_migrations/20230412201632 | 1 + db/schema_migrations/20230412201642 | 1 + db/schema_migrations/20230412203234 | 1 + db/schema_migrations/20230412204143 | 1 + db/schema_migrations/20230412204201 | 1 + db/schema_migrations/20230412204224 | 1 + db/schema_migrations/20230412214119 | 1 + db/schema_migrations/20230413012807 | 1 + db/schema_migrations/20230413041917 | 1 + db/schema_migrations/20230413041918 | 1 + db/schema_migrations/20230413041919 | 1 + db/schema_migrations/20230413041920 | 1 + db/schema_migrations/20230413080906 | 1 + db/schema_migrations/20230413080918 | 1 + db/schema_migrations/20230413153140 | 1 + db/schema_migrations/20230414075119 | 1 + db/schema_migrations/20230418154454 | 1 + db/schema_migrations/20230418164957 | 1 + db/schema_migrations/20230419164438 | 1 + db/structure.sql | 755 +- 1681 files changed, 24815 insertions(+), 27679 deletions(-) create mode 100644 db/docs/abuse_trust_scores.yml create mode 100644 db/docs/agent_user_access_group_authorizations.yml create mode 100644 db/docs/agent_user_access_project_authorizations.yml create mode 100644 db/docs/audit_events_instance_external_audit_event_destinations.yml create mode 100644 db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml create mode 100644 db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml create mode 100644 db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml create mode 100644 db/docs/deleted_tables/packages_events.yml create mode 100644 db/docs/design_management_repositories.yml create mode 100644 db/docs/dora_performance_scores.yml create mode 100644 db/docs/issue_assignment_events.yml create mode 100644 db/docs/merge_request_assignment_events.yml delete mode 100644 db/docs/packages_events.yml create mode 100644 db/docs/packages_npm_metadata_caches.yml create mode 100644 db/docs/resource_link_events.yml create mode 100644 db/docs/schema_inconsistencies.yml create mode 100644 db/docs/search_indices.yml create mode 100644 db/docs/search_namespace_index_assignments.yml create mode 100644 db/docs/service_desk_custom_email_credentials.yml create mode 100644 db/fixtures/development/37_timelogs.rb delete mode 100644 db/migrate/20210826171758_init_schema.rb delete mode 100644 db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb delete mode 100644 db/migrate/20210830140524_add_state_to_member.rb delete mode 100644 db/migrate/20210830154358_add_yaml_limit_constraints.rb delete mode 100644 db/migrate/20210831134840_add_package_file_id_channel_idx_to_packages_helm_file_metadata.rb delete mode 100644 db/migrate/20210831135249_add_installable_helm_pkgs_idx_to_packages.rb delete mode 100644 db/migrate/20210831203408_upsert_base_work_item_types.rb delete mode 100644 db/migrate/20210901065504_add_index_on_name_and_id_to_public_groups.rb delete mode 100644 db/migrate/20210902171406_add_latest_column_into_the_security_scans_table.rb delete mode 100644 db/migrate/20210902171808_set_default_job_token_scope_false.rb delete mode 100644 db/migrate/20210902184334_add_expire_access_tokens_to_doorkeeper_application.rb delete mode 100644 db/migrate/20210903054158_recreate_stage_issue_events_table_with_bigints.rb delete mode 100644 db/migrate/20210906100021_delete_project_namespace_trigger.rb delete mode 100644 db/migrate/20210907182337_add_group_id_fkey_for_user_group_callout.rb delete mode 100644 db/migrate/20210907182359_add_user_id_fkey_for_user_group_callout.rb delete mode 100644 db/migrate/20210908060951_add_dast_schedules_to_plan_limits.rb delete mode 100644 db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb delete mode 100644 db/migrate/20210908100810_add_jobs_per_stage_page_size_to_application_settings.rb delete mode 100644 db/migrate/20210908140437_add_sidekiq_limits_to_application_settings.rb delete mode 100644 db/migrate/20210908185736_add_status_to_dependency_proxy_manifests.rb delete mode 100644 db/migrate/20210908185754_add_status_to_dependency_proxy_blobs.rb delete mode 100644 db/migrate/20210908195506_add_data_to_vulnerability_finding_evidence.rb delete mode 100644 db/migrate/20210909184349_add_index_package_id_id_on_package_files.rb delete mode 100644 db/migrate/20210910014741_add_dependency_proxy_ttl_group_policy_worker_capacity_to_application_settings.rb delete mode 100644 db/migrate/20210910015047_add_app_settings_dep_proxy_ttl_worker_capacity_check_constraint.rb delete mode 100644 db/migrate/20210910141043_change_ci_minutes_additional_pack_text_limit.rb delete mode 100644 db/migrate/20210910192921_add_report_type_into_approval_project_rules.rb delete mode 100644 db/migrate/20210912034903_add_runner_features_to_ci_builds_metadata.rb delete mode 100644 db/migrate/20210913010411_create_agent_project_authorizations.rb delete mode 100644 db/migrate/20210913010432_add_agent_project_authorizations_foreign_keys.rb delete mode 100644 db/migrate/20210913122457_add_namespace_traversal_ids_to_ci_pending_builds.rb delete mode 100644 db/migrate/20210913224558_update_dependency_proxy_manifests_uniqueness_constraint.rb delete mode 100644 db/migrate/20210914145810_add_throttle_deprecated_api_columns.rb delete mode 100644 db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb delete mode 100644 db/migrate/20210915000453_add_index_on_clusters_integration_prometheus_enabled.rb delete mode 100644 db/migrate/20210915001242_add_index_on_clusters_integration_elastic_stack_enabled.rb delete mode 100644 db/migrate/20210915070423_add_avatar_and_description_to_topic.rb delete mode 100644 db/migrate/20210916132547_add_process_mode_to_resource_groups.rb delete mode 100644 db/migrate/20210917134321_remove_temporary_index_for_project_topics_on_taggings.rb delete mode 100644 db/migrate/20210917153645_remove_pipeline_fk_from_packages_build_infos.rb delete mode 100644 db/migrate/20210917153905_remove_pipeline_fk_from_packages_package_file_build_infos.rb delete mode 100644 db/migrate/20210917224419_add_registration_objective_to_user_detail.rb delete mode 100644 db/migrate/20210920104446_add_text_limit_to_topics_description_and_avatar.rb delete mode 100644 db/migrate/20210921032008_add_suggest_pipeline_enabled_to_application_settings.rb delete mode 100644 db/migrate/20210921063924_index_labels_using_varchar_pattern_ops.rb delete mode 100644 db/migrate/20210921191010_add_report_type_index_into_approval_project_rules.rb delete mode 100644 db/migrate/20210922172056_add_unique_namespaces_index_on_name_parent_id_and_type.rb delete mode 100644 db/migrate/20210922172156_drop_unique_namespaces_index_on_name_and_parent_id.rb delete mode 100644 db/migrate/20210922215740_create_issue_customer_relations_contacts.rb delete mode 100644 db/migrate/20210922220104_add_issue_customer_relations_contacts_foreign_keys.rb delete mode 100644 db/migrate/20210923042323_add_meta_data_to_user_credit_card_validations.rb delete mode 100644 db/migrate/20210923042324_limit_holder_name_on_user_credit_card_validations.rb delete mode 100644 db/migrate/20210923042325_index_meta_data_on_user_credit_card_validations.rb delete mode 100644 db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb delete mode 100644 db/migrate/20210928155022_improve_index_for_error_tracking.rb delete mode 100644 db/migrate/20210928171122_add_group_id_status_id_index_to_dependency_proxy_tables.rb delete mode 100644 db/migrate/20210929025600_add_phone_to_user_details.rb delete mode 100644 db/migrate/20210929030834_add_text_limit_to_user_details_phone.rb delete mode 100644 db/migrate/20210929031049_add_unique_index_phone_on_user_details.rb delete mode 100644 db/migrate/20210929032555_create_verification_codes.rb delete mode 100644 db/migrate/20210929115340_add_security_policy_configurations_management_project_id_foreign_key.rb delete mode 100644 db/migrate/20210929121516_add_releases_author_id_id_created_at_index.rb delete mode 100644 db/migrate/20210929144453_add_warn_about_potentially_unwanted_characters_to_project_settings.rb delete mode 100644 db/migrate/20210930081208_fix_deprecated_api_throttle_defaults.rb delete mode 100644 db/migrate/20211001001222_add_source_version_to_bulk_imports.rb delete mode 100644 db/migrate/20211004062942_create_coverage_fuzzing_corpuses.rb delete mode 100644 db/migrate/20211004075629_add_topics_name_gin_index.rb delete mode 100644 db/migrate/20211004081911_add_external_event_destination_limit_to_plan_limits.rb delete mode 100644 db/migrate/20211004122540_create_member_tasks.rb delete mode 100644 db/migrate/20211005063519_add_foreign_key_to_corpuses_on_project.rb delete mode 100644 db/migrate/20211005063616_add_foreign_key_to_corpuses_on_user.rb delete mode 100644 db/migrate/20211005063723_add_foreign_key_to_corpuses_on_package.rb delete mode 100644 db/migrate/20211005092428_drop_time_range_partitioned_loose_fk.rb delete mode 100644 db/migrate/20211005093558_add_range_partitioned_loose_fk_table.rb delete mode 100644 db/migrate/20211005100112_recreate_loose_fk_insert_function.rb delete mode 100644 db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb delete mode 100644 db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb delete mode 100644 db/migrate/20211006060254_add_topics_total_projects_count_cache.rb delete mode 100644 db/migrate/20211006103122_change_helm_channel_length.rb delete mode 100644 db/migrate/20211006122010_add_topics_total_projects_count_index.rb delete mode 100644 db/migrate/20211007090229_create_issue_search_table.rb delete mode 100644 db/migrate/20211007113136_add_status_column_to_security_scans_table.rb delete mode 100644 db/migrate/20211008043855_remove_notes_trigram_index.rb delete mode 100644 db/migrate/20211008181451_add_shared_runners_duration_to_ci_namespace_monthly_usages.rb delete mode 100644 db/migrate/20211008182954_add_shared_runners_duration_to_ci_project_monthly_usages.rb delete mode 100644 db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb delete mode 100644 db/migrate/20211011004242_create_content_blocked_states.rb delete mode 100644 db/migrate/20211011140930_create_ci_namespace_mirrors.rb delete mode 100644 db/migrate/20211011140931_create_ci_project_mirrors.rb delete mode 100644 db/migrate/20211011140932_create_namespaces_sync_events.rb delete mode 100644 db/migrate/20211011141239_create_projects_sync_events.rb delete mode 100644 db/migrate/20211011141242_create_namespaces_sync_trigger.rb delete mode 100644 db/migrate/20211011141243_create_projects_sync_trigger.rb delete mode 100644 db/migrate/20211012015903_next_traversal_ids_sibling_function.rb delete mode 100644 db/migrate/20211012091822_add_text_limit_to_bulk_imports_source_version.rb delete mode 100644 db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb delete mode 100644 db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb delete mode 100644 db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb delete mode 100644 db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb delete mode 100644 db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb delete mode 100644 db/migrate/20211013192749_add_states_into_approval_project_rules.rb delete mode 100644 db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb delete mode 100644 db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb delete mode 100644 db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb delete mode 100644 db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb delete mode 100644 db/migrate/20211019153615_add_state_to_merge_request_assignees.rb delete mode 100644 db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb delete mode 100644 db/migrate/20211020095357_add_group_traversal_id_index.rb delete mode 100644 db/migrate/20211021115409_add_color_to_epics.rb delete mode 100644 db/migrate/20211021124715_add_text_limit_to_epics_color.rb delete mode 100644 db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb delete mode 100644 db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb delete mode 100644 db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb delete mode 100644 db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb delete mode 100644 db/migrate/20211026124336_add_archive_trace_events_to_integrations.rb delete mode 100644 db/migrate/20211026143238_remove_index_releases_on_author_id.rb delete mode 100644 db/migrate/20211027203950_add_updated_index_for_dormant_users.rb delete mode 100644 db/migrate/20211028132247_create_packages_npm_metadata.rb delete mode 100644 db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb delete mode 100644 db/migrate/20211101132310_add_reindexing_queue.rb delete mode 100644 db/migrate/20211101165656_create_upload_states.rb delete mode 100644 db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb delete mode 100644 db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb delete mode 100644 db/migrate/20211105010101_add_archived_column_to_deployments.rb delete mode 100644 db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb delete mode 100644 db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb delete mode 100644 db/migrate/20211105160316_create_dotenv_application_limits.rb delete mode 100644 db/migrate/20211105161404_insert_dotenv_application_limits.rb delete mode 100644 db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb delete mode 100644 db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb delete mode 100644 db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb delete mode 100644 db/migrate/20211108204736_add_policy_idx_to_approval_project_rule.rb delete mode 100644 db/migrate/20211108211434_remove_index_for_resource_group.rb delete mode 100644 db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb delete mode 100644 db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb delete mode 100644 db/migrate/20211110010101_add_index_on_unarchived_deployments.rb delete mode 100644 db/migrate/20211110014701_create_agent_activity_events.rb delete mode 100644 db/migrate/20211110015252_add_agent_activity_events_foreign_keys.rb delete mode 100644 db/migrate/20211110092710_create_issue_emails.rb delete mode 100644 db/migrate/20211110100050_add_has_shimo_to_project_settings.rb delete mode 100644 db/migrate/20211111112425_create_merge_requests_compliance_violations.rb delete mode 100644 db/migrate/20211111112639_add_fk_compliance_violations_merge_request.rb delete mode 100644 db/migrate/20211111112713_add_fk_compliance_violations_violating_user.rb delete mode 100644 db/migrate/20211111164025_add_squash_commit_template_to_project_settings.rb delete mode 100644 db/migrate/20211111164047_add_squash_commit_template_limit_to_project_settings.rb delete mode 100644 db/migrate/20211112073413_change_package_index_on_corpus.rb delete mode 100644 db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb delete mode 100644 db/migrate/20211115132613_create_incident_management_timeline_events.rb delete mode 100644 db/migrate/20211115142803_add_foreign_key_to_incident_management_timeline_events_on_project.rb delete mode 100644 db/migrate/20211115142847_add_foreign_key_to_incident_management_timeline_events_on_user.rb delete mode 100644 db/migrate/20211115142911_add_foreign_key_to_incident_management_timeline_events_on_issue.rb delete mode 100644 db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb delete mode 100644 db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb delete mode 100644 db/migrate/20211116093739_add_foreign_key_to_incident_management_timeline_events_on_updated_by_user.rb delete mode 100644 db/migrate/20211117174209_create_vulnerability_reads.rb delete mode 100644 db/migrate/20211118100959_change_default_value_of_loose_fk_deleted_records_partition.rb delete mode 100644 db/migrate/20211118103439_remove_hardcoded_partition_from_loose_fk_trigger_function.rb delete mode 100644 db/migrate/20211118114228_add_max_ssh_key_lifetime_to_application_settings.rb delete mode 100644 db/migrate/20211118124537_add_foreign_key_to_vulnerability_reads_on_vulnerability.rb delete mode 100644 db/migrate/20211118124628_add_foreign_key_to_vulnerability_reads_on_project.rb delete mode 100644 db/migrate/20211118124650_add_foreign_key_to_vulnerability_reads_on_scanner.rb delete mode 100644 db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb delete mode 100644 db/migrate/20211119111006_create_job_artifact_states.rb delete mode 100644 db/migrate/20211119154221_create_pages_deployment_states.rb delete mode 100644 db/migrate/20211119170805_remove_test_report_requirement_issue_constraint.rb delete mode 100644 db/migrate/20211119194024_add_required_approval_count_to_protected_environments.rb delete mode 100644 db/migrate/20211119195201_create_deployment_approvals.rb delete mode 100644 db/migrate/20211122103051_add_line_code_to_draft_notes.rb delete mode 100644 db/migrate/20211122215001_add_policy_idx_to_approval_merge_request_rule.rb delete mode 100644 db/migrate/20211123135255_create_batched_background_migration_job_transition_logs.rb delete mode 100644 db/migrate/20211123181236_add_user_foreign_key_to_deployment_approvals.rb delete mode 100644 db/migrate/20211123182614_make_iteration_cadences_start_date_nullable.rb delete mode 100644 db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb delete mode 100644 db/migrate/20211124132319_add_encrypted_static_objects_external_storage_auth_token.rb delete mode 100644 db/migrate/20211126042235_add_sequence_column_to_sprints_table.rb delete mode 100644 db/migrate/20211126113029_add_text_limit_for_static_objects_external_storage_auth_token.rb delete mode 100644 db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb delete mode 100644 db/migrate/20211126142200_add_encrypted_static_object_token.rb delete mode 100644 db/migrate/20211126142354_add_text_limit_to_encrypted_static_object_token.rb delete mode 100644 db/migrate/20211126204445_add_task_to_work_item_types.rb delete mode 100644 db/migrate/20211129151155_add_migrated_to_new_structure_column_to_vulnerability_occurrences.rb delete mode 100644 db/migrate/20211129151832_add_index_on_vulnerability_occurrences_migrated_to_new_structure_column.rb delete mode 100644 db/migrate/20211130151724_add_foreign_key_to_incident_management_timeline_events_on_note.rb delete mode 100644 db/migrate/20211130205719_add_uniqueness_for_evidence_occurrence_id.rb delete mode 100644 db/migrate/20211201061733_add_future_subscriptions_to_application_settings.rb delete mode 100644 db/migrate/20211201143042_create_lfs_object_states.rb delete mode 100644 db/migrate/20211202041233_add_deployment_foreign_key_to_deployment_approvals.rb delete mode 100644 db/migrate/20211202094944_move_loose_fk_deleted_records_to_dynamic_schema.rb delete mode 100644 db/migrate/20211202135508_add_index_on_packages_build_infos_package_id_pipeline_id.rb delete mode 100644 db/migrate/20211203160952_add_updated_state_by_user_id_to_merge_request_reviewers.rb delete mode 100644 db/migrate/20211203161149_add_index_to_merge_request_reviewers_updated_state_by_user_id.rb delete mode 100644 db/migrate/20211203161840_add_updated_state_by_user_id_to_merge_request_assignees.rb delete mode 100644 db/migrate/20211203161942_add_index_to_merge_request_assignees_updated_state_by_user_id.rb delete mode 100644 db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb delete mode 100644 db/migrate/20211207154413_add_ci_runners_index_on_created_at_where_active_is_false.rb delete mode 100644 db/migrate/20211207154414_add_ci_runners_index_on_contacted_at_where_active_is_false.rb delete mode 100644 db/migrate/20211207165508_add_protected_environments_required_approval_count_check_constraint.rb delete mode 100644 db/migrate/20211208111425_add_executor_type_column_to_ci_runners.rb delete mode 100644 db/migrate/20211209230042_add_status_to_cluster_agent_tokens.rb delete mode 100644 db/migrate/20211210025754_alter_constraint_of_phone.rb delete mode 100644 db/migrate/20211210031721_change_user_details_phone_text_limit.rb delete mode 100644 db/migrate/20211213130324_update_timelogs_spent_at_default.rb delete mode 100644 db/migrate/20211213142344_add_settings_user_email_lookup_limit.rb delete mode 100644 db/migrate/20211213154259_add_status_to_packages_package_files.rb delete mode 100644 db/migrate/20211213154704_add_status_index_to_packages_package_files.rb delete mode 100644 db/migrate/20211214110307_remove_temp_index_from_vulnerability_occurrences.rb delete mode 100644 db/migrate/20211215182006_update_application_settings_protected_paths.rb delete mode 100644 db/migrate/20211216133107_add_cluster_agent_id_to_vulnerability_reads.rb delete mode 100644 db/migrate/20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb delete mode 100644 db/migrate/20211216135651_add_index_to_cluster_agent_id.rb delete mode 100644 db/migrate/20211216220939_add_group_crm_settings.rb delete mode 100644 db/migrate/20211217050753_remove_artifacts_archive_id_foreign_key_from_project_pages_metadata.rb delete mode 100644 db/migrate/20211220174504_add_secure_scanning_actions_to_onboarding_progresses.rb delete mode 100644 db/migrate/20211223125921_add_temp_index_to_members_state.rb delete mode 100644 db/migrate/20211224112937_add_packages_cleanup_package_file_worker_capacity_to_application_settings.rb delete mode 100644 db/migrate/20211224114539_add_packages_cleanup_package_file_worker_capacity_check_constraint_to_app_settings.rb delete mode 100644 db/migrate/20220104174445_add_ci_runners_index_on_active_state.rb delete mode 100644 db/migrate/20220105082217_add_verification_token_to_external_ae_destinations.rb delete mode 100644 db/migrate/20220105121325_add_route_namespace_reference.rb delete mode 100644 db/migrate/20220105152547_add_foreign_key_to_updated_state_by_user_id_to_merge_request_assignees.rb delete mode 100644 db/migrate/20220105153149_add_foreign_key_to_updated_state_by_user_id_to_merge_request_reviewers.rb delete mode 100644 db/migrate/20220106111958_add_insert_or_update_vulnerability_reads_trigger.rb delete mode 100644 db/migrate/20220106112043_add_update_vulnerability_reads_trigger.rb delete mode 100644 db/migrate/20220106112085_add_update_vulnerability_reads_location_trigger.rb delete mode 100644 db/migrate/20220106141756_remove_lock_version_indexes.rb delete mode 100644 db/migrate/20220106163326_add_has_issues_on_vulnerability_reads_trigger.rb delete mode 100644 db/migrate/20220106230629_add_registry_migration_application_settings.rb delete mode 100644 db/migrate/20220106230712_add_migration_columns_to_container_repositories.rb delete mode 100644 db/migrate/20220107091629_add_route_namespace_index.rb delete mode 100644 db/migrate/20220107165036_remove_note_id_index.rb delete mode 100644 db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb delete mode 100644 db/migrate/20220110170953_create_ci_secure_files.rb delete mode 100644 db/migrate/20220111095006_add_maintainer_note_to_ci_runners.rb delete mode 100644 db/migrate/20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb delete mode 100644 db/migrate/20220111154950_add_token_expires_at_to_ci_runners.rb delete mode 100644 db/migrate/20220111154951_add_index_to_ci_runners_token_expires_at.rb delete mode 100644 db/migrate/20220111200254_remove_index_from_merge_requests.rb delete mode 100644 db/migrate/20220112115413_add_requires_verification_to_user_details.rb delete mode 100644 db/migrate/20220112205111_create_security_training_providers.rb delete mode 100644 db/migrate/20220112232037_add_member_namespace_reference.rb delete mode 100644 db/migrate/20220112232605_add_member_namespace_index.rb delete mode 100644 db/migrate/20220113125401_create_security_trainings.rb delete mode 100644 db/migrate/20220113135449_add_package_files_limit_to_application_settings.rb delete mode 100644 db/migrate/20220113135924_add_application_settings_package_files_limit_constraints.rb delete mode 100644 db/migrate/20220113164801_add_diffs_colors_to_user_preferences.rb delete mode 100644 db/migrate/20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb delete mode 100644 db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb delete mode 100644 db/migrate/20220117082611_add_text_limit_to_exad_verification_tokens.rb delete mode 100644 db/migrate/20220117225936_add_text_limits_to_container_repositories_migration_columns.rb delete mode 100644 db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb delete mode 100644 db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb delete mode 100644 db/migrate/20220118141950_add_text_limit_to_container_registry_import_target_plan.rb delete mode 100644 db/migrate/20220118155846_add_runner_token_expiration_interval_settings_to_application_settings.rb delete mode 100644 db/migrate/20220118155847_add_runner_token_expiration_interval_settings_to_namespace_settings.rb delete mode 100644 db/migrate/20220118155848_add_runner_token_expiration_interval_settings_to_project_settings.rb delete mode 100644 db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb delete mode 100644 db/migrate/20220119141407_add_dependency_proxy_size_to_namespace_statistics.rb delete mode 100644 db/migrate/20220119144253_add_dependency_proxy_size_to_namespace_root_storage_statistics.rb delete mode 100644 db/migrate/20220119170426_remove_temporary_vulnerability_occurrences_deduplication_index.rb delete mode 100644 db/migrate/20220119220620_add_scan_method_to_dast_site_profile.rb delete mode 100644 db/migrate/20220120033115_create_alert_management_alert_metric_images.rb delete mode 100644 db/migrate/20220120085655_add_ci_runner_project_index_to_runner_id_and_project_id.rb delete mode 100644 db/migrate/20220120160625_remove_temp_index_on_id_from_vulnerability_occurrences.rb delete mode 100644 db/migrate/20220120211831_temp_index_for_group_namespace_member_backfill.rb delete mode 100644 db/migrate/20220124200927_add_index_to_issues.rb delete mode 100644 db/migrate/20220125084127_add_cleanup_attempts_to_loose_foreign_keys_deleted_records.rb delete mode 100644 db/migrate/20220125122228_add_topics_non_private_projects_count.rb delete mode 100644 db/migrate/20220125122725_add_topics_non_private_projects_count_index.rb delete mode 100644 db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb delete mode 100644 db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb delete mode 100644 db/migrate/20220128093756_add_ecdsa_sk_and_ed25519_sk_key_restrictions_to_application_settings.rb delete mode 100644 db/migrate/20220128194722_add_index_on_migration_state_and_import_done_at_to_container_repositories.rb delete mode 100644 db/migrate/20220131135725_add_severity_level_to_merge_requests_compliance_violations.rb delete mode 100644 db/migrate/20220131192643_add_show_diff_preview_in_email_to_project_settings.rb delete mode 100644 db/migrate/20220201205300_remove_index_for_vulnerability_occurrences.rb delete mode 100644 db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb delete mode 100644 db/migrate/20220202115350_add_migration_indexes_to_container_repositories.rb delete mode 100644 db/migrate/20220203074916_add_topics_lower_name_index.rb delete mode 100644 db/migrate/20220203091304_fix_unique_packages_index_excluding_pending_destruction_status.rb delete mode 100644 db/migrate/20220203123333_add_batched_migration_max_batch.rb delete mode 100644 db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb delete mode 100644 db/migrate/20220203134942_add_hidden_to_projects.rb delete mode 100644 db/migrate/20220204093120_create_analytics_cycle_analytics_aggregations.rb delete mode 100644 db/migrate/20220204154220_add_index_on_greatest_done_at_to_container_repositories.rb delete mode 100644 db/migrate/20220204193000_add_integrations_encrypted_properties.rb delete mode 100644 db/migrate/20220207083129_add_users_get_by_id_limit_to_application_setting.rb delete mode 100644 db/migrate/20220208170445_add_not_valid_foreign_key_to_ci_builds_runner_id.rb delete mode 100644 db/migrate/20220208171826_update_default_scan_method_of_dast_site_profile.rb delete mode 100644 db/migrate/20220211090920_cleanup_populate_topics_non_private_projects_count.rb delete mode 100644 db/migrate/20220211125954_create_related_epic_links.rb delete mode 100644 db/migrate/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe.rb delete mode 100644 db/migrate/20220213100000_remove_integration_type_triggers.rb delete mode 100644 db/migrate/20220215164709_update_application_settings_container_registry_exp_pol_worker_capacity_default.rb delete mode 100644 db/migrate/20220216110023_create_saved_replies.rb delete mode 100644 db/migrate/20220217100008_add_container_registry_expiration_policies_caching_to_application_settings.rb delete mode 100644 db/migrate/20220217113058_add_status_to_status_check_responses.rb delete mode 100644 db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb delete mode 100644 db/migrate/20220222072536_add_target_access_levels_to_broadcast_messages.rb delete mode 100644 db/migrate/20220301002101_add_security_orchestration_policy_configuration_namespace_reference.rb delete mode 100644 db/migrate/20220301003502_add_security_orchestration_policy_configuration_namespace_index.rb delete mode 100644 db/migrate/20220301091503_add_not_null_constraint_to_security_policy_configurations.rb delete mode 100644 db/migrate/20220301175104_change_security_orchestration_policy_configuration_project_index.rb delete mode 100644 db/migrate/20220301175426_create_project_build_artifacts_size_refresh.rb delete mode 100644 db/migrate/20220302110724_add_group_features_table.rb delete mode 100644 db/migrate/20220303190555_add_comment_to_deployment_approvals.rb delete mode 100644 db/migrate/20220303191047_add_text_limit_to_deployment_approvals_comment.rb delete mode 100644 db/migrate/20220304052335_remove_not_null_contraint_on_title_from_sprints.rb delete mode 100644 db/migrate/20220304061631_remove_unique_index_for_sprints_on_iterations_cadence_id_and_title.rb delete mode 100644 db/migrate/20220304062107_remove_unique_index_for_sprints_on_project_id_and_title.rb delete mode 100644 db/migrate/20220304152729_add_default_to_required_python_on_packages_pypi_metadata.rb delete mode 100644 db/migrate/20220307203458_rename_user_email_lookup_limit_setting_to_search_settings.rb delete mode 100644 db/migrate/20220309100648_add_time_to_restore_service_dora_metric.rb delete mode 100644 db/migrate/20220310011530_add_database_grafana_config_to_application_settings.rb delete mode 100644 db/migrate/20220310011613_add_text_limit_to_database_grafana_application_settings.rb delete mode 100644 db/migrate/20220310101118_update_holder_name_limit.rb delete mode 100644 db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb delete mode 100644 db/migrate/20220314184009_create_protected_environment_approval_rules.rb create mode 100644 db/migrate/20220314184009_init_schema.rb create mode 100644 db/migrate/20221229172604_add_runner_registration_enabled_to_project_settings.rb create mode 100644 db/migrate/20230127024835_add_database_apdex_settings_to_application_settings.rb create mode 100644 db/migrate/20230207002330_add_project_group_link_on_delete_cascade_fk.rb create mode 100644 db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb create mode 100644 db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb create mode 100644 db/migrate/20230228183644_add_partitioning_info_to_postgres_foreign_keys.rb create mode 100644 db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb create mode 100644 db/migrate/20230307000000_create_design_management_repository.rb create mode 100644 db/migrate/20230307132729_create_schema_inconsistencies.rb create mode 100644 db/migrate/20230307212637_remove_create_learn_gitlab_worker_job_instances.rb create mode 100644 db/migrate/20230308154243_add_package_id_to_ml_candidates.rb create mode 100644 db/migrate/20230308154244_add_package_id_foreign_key_to_ml_candidates.rb create mode 100644 db/migrate/20230308154245_add_index_on_package_id_for_ml_candidates.rb create mode 100644 db/migrate/20230313012226_create_search_indices.rb create mode 100644 db/migrate/20230313012609_create_search_namespace_index_assignments.rb create mode 100644 db/migrate/20230313014038_add_search_index_foreign_key_to_search_namespace_index_assignments.rb create mode 100644 db/migrate/20230313031351_create_resource_link_events.rb create mode 100644 db/migrate/20230313181536_create_packages_npm_metadata_caches.rb create mode 100644 db/migrate/20230315053635_add_screenshot_to_abuse_reports.rb create mode 100644 db/migrate/20230316093433_insert_daily_invites_trial_plan_limits.rb create mode 100644 db/migrate/20230316095948_create_service_desk_custom_email_credentials.rb create mode 100644 db/migrate/20230317162059_add_current_user_todos_work_item_widget.rb create mode 100644 db/migrate/20230321085011_add_column_to_users_statistisc.rb create mode 100644 db/migrate/20230321113956_add_indexes_to_merge_request_compliance_violations.rb create mode 100644 db/migrate/20230321153304_rename_ml_candidates_iid_to_eid.rb create mode 100644 db/migrate/20230321161218_add_project_access_token_limit_to_plan_limits.rb create mode 100644 db/migrate/20230321161441_insert_project_access_token_limit.rb create mode 100644 db/migrate/20230321162810_add_project_id_to_ml_candidates.rb create mode 100644 db/migrate/20230321162902_add_index_on_project_id_on_ml_candidates.rb create mode 100644 db/migrate/20230321163051_add_project_id_foreign_key_to_ml_candidates.rb create mode 100644 db/migrate/20230321170734_add_internal_id_to_ml_candidates.rb create mode 100644 db/migrate/20230321170803_add_index_on_project_id_on_internal_id_to_ml_candidates.rb create mode 100644 db/migrate/20230322145403_add_project_id_foreign_key_to_packages_npm_metadata_caches.rb create mode 100644 db/migrate/20230322151605_rerun_remove_invalid_deploy_access_level.rb create mode 100644 db/migrate/20230322162512_add_valid_deploy_access_level_constraint.rb create mode 100644 db/migrate/20230323021618_add_silent_mode_enabled_to_application_settings.rb create mode 100644 db/migrate/20230323101138_add_award_emoji_work_item_widget.rb create mode 100644 db/migrate/20230323120601_create_dora_performance_scores.rb create mode 100644 db/migrate/20230323140745_add_root_directory_to_pages_deployment.rb create mode 100644 db/migrate/20230323140746_add_text_limit_to_pages_deployment_root_directory.rb create mode 100644 db/migrate/20230323153042_track_push_rules_deletions.rb create mode 100644 db/migrate/20230323153328_track_tags_deletions.rb create mode 100644 db/migrate/20230323191750_add_shard_settings_to_search_indices.rb create mode 100644 db/migrate/20230327074932_add_text_limit_to_abuse_reports_screenshot.rb create mode 100644 db/migrate/20230327123333_backfill_product_analytics_data_collector_host.rb create mode 100644 db/migrate/20230328020316_delete_unused_index_on_merge_requests_on_state_id_and_merge_status.rb create mode 100644 db/migrate/20230328023535_initialize_conversion_of_award_emoji_awardable_id_to_bigint.rb create mode 100644 db/migrate/20230328031720_initialize_conversion_of_events_target_id_to_bigint.rb create mode 100644 db/migrate/20230329032129_add_lock_version_to_terraform_state.rb create mode 100644 db/migrate/20230329085754_add_foreign_key_to_resource_link_events_on_user.rb create mode 100644 db/migrate/20230329152410_add_achievements_enabled_to_user_preferences.rb create mode 100644 db/migrate/20230329194244_add_index_packages_debian_file_metadata_when_unknown.rb create mode 100644 db/migrate/20230330101438_create_fk_ml_candidate_params_on_candidate_id.rb create mode 100644 db/migrate/20230330101439_validate_fk_ml_candidate_params_on_candidate_id.rb create mode 100644 db/migrate/20230330101440_remove_old_fk_ml_candidate_params_on_candidate_id.rb create mode 100644 db/migrate/20230330101441_create_fk_ml_candidate_metrics_on_candidate_id.rb create mode 100644 db/migrate/20230330101442_validate_fk_ml_candidate_metrics_on_candidate_id.rb create mode 100644 db/migrate/20230330101443_remove_old_fk_ml_candidate_metrics_on_candidate_id.rb create mode 100644 db/migrate/20230330215636_remove_unused_project_jira_indexes.rb create mode 100644 db/migrate/20230331142006_add_open_ai_api_key_application_setting.rb create mode 100644 db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb create mode 100644 db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb create mode 100644 db/migrate/20230403113620_add_pinned_nav_items_to_user_preference.rb create mode 100644 db/migrate/20230403145705_add_purl_sync_to_settings.rb create mode 100644 db/migrate/20230403164454_add_fork_storage_size_columns_to_root_storage_statistics.rb create mode 100644 db/migrate/20230405102815_add_unique_namespace_index_to_storage_limit_exclusions.rb create mode 100644 db/migrate/20230406040908_add_system_note_metadata_id__to_resource_link_events.rb create mode 100644 db/migrate/20230406042906_add_unique_index_to_resource_link_events_on_system_note_metadata_id.rb create mode 100644 db/migrate/20230406043900_add_system_note_metadata_foreign_key_to_resource_link_events.rb create mode 100644 db/migrate/20230406060452_create_instance_external_audit_event_destinations.rb create mode 100644 db/migrate/20230406073847_validate_foreign_key_for_resource_link_events_on_system_note_metadata_id.rb create mode 100644 db/migrate/20230406095544_add_pa_configurator_base_to_app_settings.rb create mode 100644 db/migrate/20230406134436_add_identity_toggle_to_user_preferences.rb create mode 100644 db/migrate/20230406150254_create_agent_user_access_project_authorizations_table.rb create mode 100644 db/migrate/20230406150354_create_agent_user_access_group_authorizations_table.rb create mode 100644 db/migrate/20230406150454_add_fks_to_agent_user_access_authorizations.rb create mode 100644 db/migrate/20230407164616_add_code_suggestions_to_namespace_settings.rb create mode 100644 db/migrate/20230410092450_add_product_analytics_instrumentation_key_to_project_settings.rb create mode 100644 db/migrate/20230411171001_create_abuse_trust_scores.rb create mode 100644 db/migrate/20230412073614_create_issue_assignment_events.rb create mode 100644 db/migrate/20230412080242_add_concurrent_fk_to_issue_assignment_events.rb create mode 100644 db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb create mode 100644 db/migrate/20230413080906_create_merge_request_assignment_events.rb create mode 100644 db/migrate/20230413080918_add_concurrent_fk_to_merge_request_assignment_events.rb create mode 100644 db/migrate/20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb delete mode 100644 db/post_migrate/20210826193907_add_unique_index_dast_site_token_project_id_and_url.rb delete mode 100644 db/post_migrate/20210830104800_reschedule_extract_project_topics_into_separate_table.rb delete mode 100644 db/post_migrate/20210831123008_drop_temporary_trigger_for_ci_sources_pipelines.rb delete mode 100644 db/post_migrate/20210901044202_push_event_payloads_bigint_conversion_remove_triggers.rb delete mode 100644 db/post_migrate/20210901044237_events_bigint_conversion_remove_triggers.rb delete mode 100644 db/post_migrate/20210901153324_slice_merge_request_diff_commit_migrations.rb delete mode 100644 db/post_migrate/20210901184511_prepare_async_indexes_for_ci_builds.rb delete mode 100644 db/post_migrate/20210902144144_drop_temporary_columns_and_triggers_for_ci_build_needs.rb delete mode 100644 db/post_migrate/20210906100316_drop_temporary_columns_and_triggers_for_ci_build_trace_chunks.rb delete mode 100644 db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb delete mode 100644 db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb delete mode 100644 db/post_migrate/20210907021940_cleanup_bigint_conversion_for_ci_stages.rb delete mode 100644 db/post_migrate/20210907033745_cleanup_bigint_conversion_for_deployments.rb delete mode 100644 db/post_migrate/20210907041000_cleanup_bigint_conversion_for_geo_job_artifact_deleted_events.rb delete mode 100644 db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb delete mode 100644 db/post_migrate/20210908132335_disable_job_token_scope_when_unused.rb delete mode 100644 db/post_migrate/20210909104800_reschedule_extract_project_topics_into_separate_table_2.rb delete mode 100644 db/post_migrate/20210909152027_remove_container_registry_enabled.rb delete mode 100644 db/post_migrate/20210910194952_update_report_type_for_existing_approval_project_rules.rb delete mode 100644 db/post_migrate/20210914094840_add_gin_index_on_pending_builds_namespace_traversal_ids.rb delete mode 100644 db/post_migrate/20210914095310_cleanup_orphan_project_access_tokens.rb delete mode 100644 db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb delete mode 100644 db/post_migrate/20210915202900_prepare_index_resource_group_status_commit_id_for_ci_builds.rb delete mode 100644 db/post_migrate/20210918201050_remove_old_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb delete mode 100644 db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb delete mode 100644 db/post_migrate/20210920232025_remove_ci_builds_foreign_key_from_terraform_state_versions.rb delete mode 100644 db/post_migrate/20210921062820_add_image_location_index_to_vulnerability_occurrences.rb delete mode 100644 db/post_migrate/20210922021816_drop_int4_columns_for_ci_job_artifacts.rb delete mode 100644 db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb delete mode 100644 db/post_migrate/20210922082019_drop_int4_column_for_events.rb delete mode 100644 db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb delete mode 100644 db/post_migrate/20210922091402_drop_int4_column_for_push_event_payloads.rb delete mode 100644 db/post_migrate/20210923133143_remove_redundant_taggings_index.rb delete mode 100644 db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb delete mode 100644 db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb delete mode 100644 db/post_migrate/20210923192649_remove_open_project_data_table.rb delete mode 100644 db/post_migrate/20210927153807_update_issues_relative_position_indexes.rb delete mode 100644 db/post_migrate/20210930211936_backfill_user_namespace.rb delete mode 100644 db/post_migrate/20211004110500_add_temporary_index_to_issue_metrics.rb delete mode 100644 db/post_migrate/20211004110927_schedule_fix_first_mentioned_in_commit_at_job.rb delete mode 100644 db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb delete mode 100644 db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb delete mode 100644 db/post_migrate/20211005083015_recreate_index_security_ci_builds_on_name_and_id_parser_features.rb delete mode 100644 db/post_migrate/20211005194425_schedule_requirements_migration.rb delete mode 100644 db/post_migrate/20211006060436_schedule_populate_topics_total_projects_count_cache.rb delete mode 100644 db/post_migrate/20211006145004_finalize_indexes_for_ci_job_artifacts_expire_at_unlocked.rb delete mode 100644 db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb delete mode 100644 db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb delete mode 100644 db/post_migrate/20211007155221_schedule_populate_status_column_of_security_scans.rb delete mode 100644 db/post_migrate/20211011104843_add_new_loose_fk_index.rb delete mode 100644 db/post_migrate/20211011152701_cleanup_delete_orphaned_deployments_background_migration.rb delete mode 100644 db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb delete mode 100644 db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb delete mode 100644 db/post_migrate/20211012155931_remove_schedule_and_status_from_pending_alert_escalations.rb delete mode 100644 db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb delete mode 100644 db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb delete mode 100644 db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb delete mode 100644 db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb delete mode 100644 db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb delete mode 100644 db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb delete mode 100644 db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb delete mode 100644 db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb delete mode 100644 db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb delete mode 100644 db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb delete mode 100644 db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb delete mode 100644 db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb delete mode 100644 db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb delete mode 100644 db/post_migrate/20211023102243_schedule_delete_invalid_epic_issues.rb delete mode 100644 db/post_migrate/20211026070408_backfill_issue_search_data.rb delete mode 100644 db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb delete mode 100644 db/post_migrate/20211027043229_track_ci_build_deletions.rb delete mode 100644 db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb delete mode 100644 db/post_migrate/20211027064156_track_deletions_in_chat_names.rb delete mode 100644 db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb delete mode 100644 db/post_migrate/20211027204011_remove_index_for_dormant_users.rb delete mode 100644 db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb delete mode 100644 db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb delete mode 100644 db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb delete mode 100644 db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb delete mode 100644 db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb delete mode 100644 db/post_migrate/20211029102822_add_open_source_plan.rb delete mode 100644 db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb delete mode 100644 db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb delete mode 100644 db/post_migrate/20211101222614_consume_remaining_user_namespace_jobs.rb delete mode 100644 db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb delete mode 100644 db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb delete mode 100644 db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb delete mode 100644 db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb delete mode 100644 db/post_migrate/20211103184303_drop_runner_features_from_ci_builds_metadata.rb delete mode 100644 db/post_migrate/20211104044453_remove_redundant_events_index.rb delete mode 100644 db/post_migrate/20211104165220_remove_vulnerability_finding_links.rb delete mode 100644 db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb delete mode 100644 db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb delete mode 100644 db/post_migrate/20211110143306_add_not_null_constraint_to_security_findings_uuid.rb delete mode 100644 db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb delete mode 100644 db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb delete mode 100644 db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb delete mode 100644 db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb delete mode 100644 db/post_migrate/20211116091751_change_namespace_type_default_to_user.rb delete mode 100644 db/post_migrate/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings.rb delete mode 100644 db/post_migrate/20211117084814_migrate_remaining_u2f_registrations.rb delete mode 100644 db/post_migrate/20211118130836_drop_pages_deployments_builds_fk.rb delete mode 100644 db/post_migrate/20211118194239_drop_invalid_remediations.rb delete mode 100644 db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb delete mode 100644 db/post_migrate/20211122033501_improve_index_on_events_for_calendar.rb delete mode 100644 db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb delete mode 100644 db/post_migrate/20211123161906_cleanup_after_drop_invalid_security_findings.rb delete mode 100644 db/post_migrate/20211124132705_change_index_users_on_public_email.rb delete mode 100644 db/post_migrate/20211125120444_add_index_todos_project_id_user_id.rb delete mode 100644 db/post_migrate/20211130165043_backfill_sequence_column_for_sprints_table.rb delete mode 100644 db/post_migrate/20211130201100_track_deletions_in_namespaces.rb delete mode 100644 db/post_migrate/20211130201101_track_deletions_in_projects.rb delete mode 100644 db/post_migrate/20211201101541_drop_clusters_applications_runners_ci_runners_fk.rb delete mode 100644 db/post_migrate/20211202145237_add_todos_project_and_id_index.rb delete mode 100644 db/post_migrate/20211203091642_add_index_to_projects_on_marked_for_deletion_at.rb delete mode 100644 db/post_migrate/20211206073851_create_calendar_events_index_synchronously.rb delete mode 100644 db/post_migrate/20211206074547_remove_old_calendar_events_index.rb delete mode 100644 db/post_migrate/20211206161271_add_indexes_for_primary_email_cleanup_migration.rb delete mode 100644 db/post_migrate/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb delete mode 100644 db/post_migrate/20211207090503_cleanup_first_mentioned_in_commit_jobs.rb delete mode 100644 db/post_migrate/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb delete mode 100644 db/post_migrate/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4.rb delete mode 100644 db/post_migrate/20211207173510_remove_extra_finding_evidence_tables_foreign_keys.rb delete mode 100644 db/post_migrate/20211207173511_remove_extra_finding_evidence_tables.rb delete mode 100644 db/post_migrate/20211208122200_schedule_backfill_ci_namespace_mirrors.rb delete mode 100644 db/post_migrate/20211208122201_schedule_backfill_ci_project_mirrors.rb delete mode 100644 db/post_migrate/20211208171402_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb delete mode 100644 db/post_migrate/20211209093636_track_ci_job_artifacts_deletes.rb delete mode 100644 db/post_migrate/20211209093828_track_users_deletes.rb delete mode 100644 db/post_migrate/20211209093923_track_external_pull_requests_deletes.rb delete mode 100644 db/post_migrate/20211209094222_track_merge_requests_deletes.rb delete mode 100644 db/post_migrate/20211209103048_backfill_project_namespaces_for_group.rb delete mode 100644 db/post_migrate/20211209203820_add_tmp_index_on_report_type.rb delete mode 100644 db/post_migrate/20211209203821_convert_stringified_raw_metadata_hash_to_json.rb delete mode 100644 db/post_migrate/20211210140000_add_temporary_static_object_token_index.rb delete mode 100644 db/post_migrate/20211210140629_encrypt_static_object_token.rb delete mode 100644 db/post_migrate/20211210173137_remove_vulnerability_finding_links_again.rb delete mode 100644 db/post_migrate/20211213064821_add_agent_id_location_index_to_vulnerability_occurrences.rb delete mode 100644 db/post_migrate/20211213102111_drop_ci_pipelines_mr_metrics_fk.rb delete mode 100644 db/post_migrate/20211214012507_backfill_incident_issue_escalation_statuses.rb delete mode 100644 db/post_migrate/20211215090620_schedule_update_timelogs_null_spent_at.rb delete mode 100644 db/post_migrate/20211217120000_modify_kubernetes_resource_location_index_to_vulnerability_occurrences.rb delete mode 100644 db/post_migrate/20211217145923_add_index_to_events_on_author_id_and_action_and_id.rb delete mode 100644 db/post_migrate/20211217174331_mark_recalculate_finding_signatures_as_completed.rb delete mode 100644 db/post_migrate/20211220064757_drop_temporary_indexes_for_primary_email_migration.rb delete mode 100644 db/post_migrate/20211220120402_add_index_on_ci_pipelines_user_id_id_failure_reason.rb delete mode 100644 db/post_migrate/20211220123956_update_invalid_member_states.rb delete mode 100644 db/post_migrate/20211229023654_add_async_index_ci_job_artifacts_project_id_file_type.rb delete mode 100644 db/post_migrate/20211230112517_remove_index_events_on_author_id_and_action_and_id.rb delete mode 100644 db/post_migrate/20211230113031_add_index_to_events_on_author_id_and_id.rb delete mode 100644 db/post_migrate/20220104060049_remove_foreign_key_ci_group_variables_group_id.rb delete mode 100644 db/post_migrate/20220105020514_remove_ci_minutes_additional_packs_namespace_id_foreign_key_constraint.rb delete mode 100644 db/post_migrate/20220106185033_remove_finding_evidence_summary.rb delete mode 100644 db/post_migrate/20220106231518_remove_foreign_key_ci_daily_build_group_report_results_group_id.rb delete mode 100644 db/post_migrate/20220106233459_remove_foreign_key_ci_pending_builds_namespace_id.rb delete mode 100644 db/post_migrate/20220106235626_remove_foreign_key_ci_runner_namespaces_namespace_id.rb delete mode 100644 db/post_migrate/20220107064845_populate_vulnerability_reads.rb delete mode 100644 db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb delete mode 100644 db/post_migrate/20220110171049_schedule_populate_test_reports_issue_id.rb delete mode 100644 db/post_migrate/20220110224913_remove_dast_scanner_profiles_builds_ci_build_id_fk.rb delete mode 100644 db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb delete mode 100644 db/post_migrate/20220110233155_remove_dast_site_profiles_builds_ci_build_id_fk.rb delete mode 100644 db/post_migrate/20220111002756_remove_security_scans_build_id_fk.rb delete mode 100644 db/post_migrate/20220111023852_index_cluster_agent_tokens_on_status.rb delete mode 100644 db/post_migrate/20220111093534_remove_index_on_auto_stop_in.rb delete mode 100644 db/post_migrate/20220111101421_remove_index_on_merge_request_id.rb delete mode 100644 db/post_migrate/20220111102314_truncate_ci_mirror_tables.rb delete mode 100644 db/post_migrate/20220111221516_remove_projects_ci_pending_builds_fk.rb delete mode 100644 db/post_migrate/20220112015940_remove_projects_ci_running_builds_fk.rb delete mode 100644 db/post_migrate/20220112090556_remove_cascade_delete_from_project_namespace_foreign_key.rb delete mode 100644 db/post_migrate/20220112230642_remove_projects_ci_unit_tests_project_id_fk.rb delete mode 100644 db/post_migrate/20220112232723_remove_projects_ci_daily_build_group_report_results_project_id_fk.rb delete mode 100644 db/post_migrate/20220113013319_remove_projects_ci_freeze_periods_project_id_fk.rb delete mode 100644 db/post_migrate/20220113014438_remove_projects_ci_resource_groups_project_id_fk.rb delete mode 100644 db/post_migrate/20220113015830_remove_projects_ci_build_report_results_project_id_fk.rb delete mode 100644 db/post_migrate/20220113035519_remove_users_ci_job_token_project_scope_links_added_by_id_fk.rb delete mode 100644 db/post_migrate/20220113040447_remove_users_ci_pipeline_schedules_owner_id_fk.rb delete mode 100644 db/post_migrate/20220113111440_schedule_fix_incorrect_max_seats_used.rb delete mode 100644 db/post_migrate/20220114105525_add_index_on_projects_path.rb delete mode 100644 db/post_migrate/20220116175851_add_author_index_to_design_management_versions.rb delete mode 100644 db/post_migrate/20220117034056_remove_index_cluster_agent_tokens_on_agent_id_and_last_used_at.rb delete mode 100644 db/post_migrate/20220118204039_self_managed_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb delete mode 100644 db/post_migrate/20220119094503_populate_audit_event_streaming_verification_token.rb delete mode 100644 db/post_migrate/20220119141736_remove_projects_ci_pipeline_artifacts_project_id_fk.rb delete mode 100644 db/post_migrate/20220119143130_remove_projects_ci_sources_pipelines_source_project_id_fk.rb delete mode 100644 db/post_migrate/20220119144458_remove_users_ci_triggers_owner_id_fk.rb delete mode 100644 db/post_migrate/20220119151221_remove_merge_requests_ci_pipelines_merge_request_id_fk.rb delete mode 100644 db/post_migrate/20220119153706_remove_ci_pipelines_merge_trains_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220119154442_remove_ci_pipelines_merge_requests_head_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220119193130_remove_ci_pipelines_dast_profiles_pipelines_ci_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220119201340_remove_ci_pipelines_vulnerability_statistics_latest_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220119203119_remove_ci_pipelines_vulnerability_occurrence_pipelines_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220120094340_drop_position_from_security_findings.rb delete mode 100644 db/post_migrate/20220120123700_add_tmp_index_routes_id_for_namespaces.rb delete mode 100644 db/post_migrate/20220120123800_backfill_namespace_id_for_namespace_routes.rb delete mode 100644 db/post_migrate/20220120211832_backfill_member_namespace_id_for_group_members.rb delete mode 100644 db/post_migrate/20220121214752_remove_projects_ci_stages_project_id_fk.rb delete mode 100644 db/post_migrate/20220121214753_re_remove_projects_ci_stages_project_id_fk.rb delete mode 100644 db/post_migrate/20220121221651_remove_projects_ci_variables_project_id_fk.rb delete mode 100644 db/post_migrate/20220124130028_dedup_runner_projects.rb delete mode 100644 db/post_migrate/20220124145019_remove_projects_external_pull_requests_project_id_fk.rb delete mode 100644 db/post_migrate/20220124151456_remove_projects_ci_triggers_project_id_fk.rb delete mode 100644 db/post_migrate/20220124151949_remove_projects_ci_runner_projects_project_id_fk.rb delete mode 100644 db/post_migrate/20220124152824_remove_projects_ci_subscriptions_projects_downstream_project_id_fk.rb delete mode 100644 db/post_migrate/20220124153233_remove_projects_ci_job_artifacts_project_id_fk.rb delete mode 100644 db/post_migrate/20220124153234_re_remove_projects_ci_job_artifacts_project_id_fk.rb delete mode 100644 db/post_migrate/20220124180704_remove_projects_ci_builds_metadata_project_id_fk.rb delete mode 100644 db/post_migrate/20220124180705_re_remove_projects_ci_builds_metadata_project_id_fk.rb delete mode 100644 db/post_migrate/20220124184338_remove_projects_ci_subscriptions_projects_upstream_project_id_fk.rb delete mode 100644 db/post_migrate/20220124204046_remove_projects_ci_sources_pipelines_project_id_fk.rb delete mode 100644 db/post_migrate/20220124214131_remove_projects_ci_refs_project_id_fk.rb delete mode 100644 db/post_migrate/20220124215857_remove_projects_ci_job_token_project_scope_links_source_project_id_fk.rb delete mode 100644 db/post_migrate/20220124221521_remove_projects_ci_project_monthly_usages_project_id_fk.rb delete mode 100644 db/post_migrate/20220125083520_remove_ci_pipelines_dast_site_profiles_pipelines_ci_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220125084348_remove_ci_pipelines_vulnerability_feedback_pipeline_id_fk.rb delete mode 100644 db/post_migrate/20220125122640_schedule_populate_topics_non_private_projects_count.rb delete mode 100644 db/post_migrate/20220126201752_remove_projects_ci_job_token_project_scope_links_target_project_id_fk.rb delete mode 100644 db/post_migrate/20220126202654_remove_projects_ci_sources_projects_source_project_id_fk.rb delete mode 100644 db/post_migrate/20220126203421_remove_projects_ci_pipeline_schedules_project_id_fk.rb delete mode 100644 db/post_migrate/20220126210021_remove_projects_ci_builds_project_id_fk.rb delete mode 100644 db/post_migrate/20220126210022_re_remove_projects_ci_builds_project_id_fk.rb delete mode 100644 db/post_migrate/20220126210657_remove_projects_ci_pipelines_project_id_fk.rb delete mode 100644 db/post_migrate/20220127112243_add_index_to_merge_request_assignees_state.rb delete mode 100644 db/post_migrate/20220127112412_add_index_to_merge_request_reviewers_state.rb delete mode 100644 db/post_migrate/20220127132200_cleanup_backfill_ci_namespace_mirrors.rb delete mode 100644 db/post_migrate/20220127132201_cleanup_backfill_ci_project_mirrors.rb delete mode 100644 db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb delete mode 100644 db/post_migrate/20220128155251_remove_dangling_running_builds.rb delete mode 100644 db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb delete mode 100644 db/post_migrate/20220131000000_index_job_artifacts_on_trace_type_and_expire_at.rb delete mode 100644 db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb delete mode 100644 db/post_migrate/20220201034731_remove_index_clusters_kubernetes_namespaces_on_cluster_id.rb delete mode 100644 db/post_migrate/20220201141705_cleanup_background_migration_populate_test_reports_issue_id.rb delete mode 100644 db/post_migrate/20220201173212_add_user_details_provisioning_index.rb delete mode 100644 db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb delete mode 100644 db/post_migrate/20220202105733_delete_service_template_records.rb delete mode 100644 db/post_migrate/20220204053655_remove_index_epic_issues_on_epic_id.rb delete mode 100644 db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb delete mode 100644 db/post_migrate/20220204110725_backfill_cycle_analytics_aggregations.rb delete mode 100644 db/post_migrate/20220204194347_encrypt_integration_properties.rb delete mode 100644 db/post_migrate/20220207080758_update_api_indexes_for_projects.rb delete mode 100644 db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb delete mode 100644 db/post_migrate/20220208115439_start_backfill_ci_queuing_tables.rb delete mode 100644 db/post_migrate/20220209111007_add_partial_index_for_batching_active_cluster_image_scanning_vulnerabilities.rb delete mode 100644 db/post_migrate/20220212120735_schedule_fix_incorrect_max_seats_used2.rb delete mode 100644 db/post_migrate/20220213103859_remove_integrations_type.rb delete mode 100644 db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb delete mode 100644 db/post_migrate/20220215190020_rerun_convert_stringified_raw_metadata_hash_to_json.rb delete mode 100644 db/post_migrate/20220216201949_remove_package_files_limit_from_application_settings.rb delete mode 100644 db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb delete mode 100644 db/post_migrate/20220221214928_remove_show_diff_preview_in_email_column.rb delete mode 100644 db/post_migrate/20220222191845_remove_not_null_constraint_for_security_scan_succeeded.rb delete mode 100644 db/post_migrate/20220222192524_create_not_null_constraint_releases_tag.rb delete mode 100644 db/post_migrate/20220222192525_remove_null_releases.rb delete mode 100644 db/post_migrate/20220223112304_schedule_nullify_orphan_runner_id_on_ci_builds.rb delete mode 100644 db/post_migrate/20220223124428_schedule_merge_topics_with_same_name.rb delete mode 100644 db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb delete mode 100644 db/post_migrate/20220224204415_recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb delete mode 100644 db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb delete mode 100644 db/post_migrate/20220301093434_backfill_all_project_namespaces.rb delete mode 100644 db/post_migrate/20220302114046_backfill_group_features.rb delete mode 100644 db/post_migrate/20220302203410_create_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb delete mode 100644 db/post_migrate/20220304165107_drop_partitioned_foreign_keys.rb delete mode 100644 db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb delete mode 100644 db/post_migrate/20220305223212_add_security_training_providers.rb delete mode 100644 db/post_migrate/20220307192534_create_index_for_remove_duplicate_project_tag_releases.rb delete mode 100644 db/post_migrate/20220307192610_remove_duplicate_project_tag_releases.rb delete mode 100644 db/post_migrate/20220307192645_remove_index_for_remove_duplicate_project_tag_releases.rb delete mode 100644 db/post_migrate/20220307192725_create_unique_index_release_tag_project.rb delete mode 100644 db/post_migrate/20220307203459_rename_user_email_lookup_limit_setting_to_search_settings_cleanup.rb delete mode 100644 db/post_migrate/20220308000205_drop_old_index_security_ci_builds_on_name_and_id_parser_features.rb delete mode 100644 db/post_migrate/20220308115219_schedule_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb delete mode 100644 db/post_migrate/20220308115502_schedule_reset_duplicate_ci_runners_token_values_on_projects.rb delete mode 100644 db/post_migrate/20220309084838_remove_external_pull_request_tracking.rb delete mode 100644 db/post_migrate/20220309084954_remove_leftover_external_pull_request_deletions.rb delete mode 100644 db/post_migrate/20220309154855_add_index_on_issues_closed_incidents.rb delete mode 100644 db/post_migrate/20220310095341_add_async_index_ci_job_artifacts_project_id_created_at.rb delete mode 100644 db/post_migrate/20220310134207_add_index_project_id_and_released_at_and_id_on_releases.rb delete mode 100644 db/post_migrate/20220310141349_remove_dependency_list_usage_data_from_redis.rb delete mode 100644 db/post_migrate/20220311010352_create_scan_id_and_id_index_on_security_findings.rb delete mode 100644 db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb delete mode 100644 db/post_migrate/20220314162342_add_index_ci_job_artifacts_project_id_created_at.rb create mode 100644 db/post_migrate/20230209222452_schedule_remove_project_group_link_with_missing_groups.rb create mode 100644 db/post_migrate/20230221093535_add_sync_tmp_partial_index_on_vulnerability_report_types.rb create mode 100644 db/post_migrate/20230221093536_schedule_migrate_shared_vulnerability_identifiers.rb create mode 100644 db/post_migrate/20230301020246_ensure_mr_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230301020356_swap_merge_request_user_mentions_note_id_to_bigint.rb create mode 100644 db/post_migrate/20230309085547_prepare_ci_builds_constraints_for_list_partitioning.rb create mode 100644 db/post_migrate/20230313031629_ensure_commit_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230313142631_backfill_ml_candidates_package_id.rb create mode 100644 db/post_migrate/20230314144640_reschedule_migration_for_links.rb create mode 100644 db/post_migrate/20230314210657_set_email_confirmation_setting_from_soft_email_confirmation_ff.rb create mode 100644 db/post_migrate/20230315084704_finalize_issues_iid_scoping_to_namespace.rb create mode 100644 db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb create mode 100644 db/post_migrate/20230316014651_remove_index_on_events_action.rb create mode 100644 db/post_migrate/20230316114426_swap_ci_runner_machine_builds_primary_key.rb create mode 100644 db/post_migrate/20230316164917_remove_packages_events_package_id_fk.rb create mode 100644 db/post_migrate/20230316185746_drop_packages_events_table.rb create mode 100644 db/post_migrate/20230317075852_add_tmp_unique_packages_index_when_debian.rb create mode 100644 db/post_migrate/20230317080000_ensure_unique_debian_packages.rb create mode 100644 db/post_migrate/20230317080137_add_unique_packages_index_when_debian.rb create mode 100644 db/post_migrate/20230317151841_remove_from_to_state_constraint.rb create mode 100644 db/post_migrate/20230317195228_prepare_async_sent_notifications_index.rb create mode 100644 db/post_migrate/20230319105436_remove_member_role_download_code.rb create mode 100644 db/post_migrate/20230320110802_add_index_to_vulnerability_findings_on_uuid.rb create mode 100644 db/post_migrate/20230320155635_add_index_to_namespace_details.rb create mode 100644 db/post_migrate/20230321003252_swap_commit_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb create mode 100644 db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230321024333_ensure_design_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230321024903_swap_design_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230321095759_remove_namespaces_broadcast_messages_namespace_id_fk.rb create mode 100644 db/post_migrate/20230321124837_remove_ci_builds_partition_id_default.rb create mode 100644 db/post_migrate/20230321153035_add_package_id_created_at_desc_index_to_package_files.rb create mode 100644 db/post_migrate/20230321153337_cleanup_ml_candidates_iid_rename.rb create mode 100644 db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb create mode 100644 db/post_migrate/20230321163947_backfill_ml_candidates_project_id.rb create mode 100644 db/post_migrate/20230321170823_backfill_ml_candidates_internal_id.rb create mode 100644 db/post_migrate/20230322011220_ensure_snippet_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230322012209_swap_snippet_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230322023442_ensure_note_diff_files_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230322085041_remove_user_namespace_records_from_vsa_aggregation.rb create mode 100644 db/post_migrate/20230322085852_validate_partitioning_constraint_on_ci_builds.rb create mode 100644 db/post_migrate/20230322151635_cleanup_bigint_conversion_for_merge_request_metrics.rb create mode 100644 db/post_migrate/20230322203927_change_user_type_default.rb create mode 100644 db/post_migrate/20230323005730_add_unique_index_diff_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230323010111_add_fk_on_diff_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230323013251_async_validate_fk_note_diff_files_diff_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230323131521_remove_machine_id_from_builds_metadata.rb create mode 100644 db/post_migrate/20230323153433_fix_application_setting_push_rule_id_fk.rb create mode 100644 db/post_migrate/20230327125705_add_index_to_vulnerability_finding_signatures_on_signature_sha.rb create mode 100644 db/post_migrate/20230327144152_remove_ci_builds_partition_id_default_v2.rb create mode 100644 db/post_migrate/20230328023554_backfill_award_emoji_awardable_id_for_bigint_conversion.rb create mode 100644 db/post_migrate/20230328031838_backfill_events_target_id_for_bigint_conversion.rb create mode 100644 db/post_migrate/20230328100534_truncate_error_tracking_tables.rb create mode 100644 db/post_migrate/20230328151756_prepare_async_index_for_security_scans_on_pipeline_id_and_scan_type.rb create mode 100644 db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb create mode 100644 db/post_migrate/20230329091107_truncate_p_ci_runner_machine_builds.rb create mode 100644 db/post_migrate/20230329091300_swap_ci_runner_machine_builds_primary_key_v2.rb create mode 100644 db/post_migrate/20230329100222_drop_software_licenses_temp_index.rb create mode 100644 db/post_migrate/20230330080731_remove_tmp_index_vuln_occurrences_on_report_type.rb create mode 100644 db/post_migrate/20230330103104_reschedule_migrate_evidences.rb create mode 100644 db/post_migrate/20230403023828_swap_note_diff_files_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230403041642_ensure_issue_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230403041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230403085957_add_tmp_partial_index_on_vulnerability_report_types2.rb create mode 100644 db/post_migrate/20230403085958_add_sync_tmp_partial_index_on_vulnerability_report_types2.rb create mode 100644 db/post_migrate/20230403190527_add_index_to_security_scans_on_scan_type.rb create mode 100644 db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb create mode 100644 db/post_migrate/20230403231455_add_unique_index_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230403231841_add_fk_on_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230403232121_async_validate_fk_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230404023648_ensure_suggestions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230404023915_swap_suggestions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230404030757_ensure_epic_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230404031041_swap_epic_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb create mode 100644 db/post_migrate/20230404050414_remove_unused_merge_request_jira_indexes.rb create mode 100644 db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb create mode 100644 db/post_migrate/20230404132544_prepare_async_index_for_override_uuids_logic.rb create mode 100644 db/post_migrate/20230404194907_remove_mr_mentions_temp_index.rb create mode 100644 db/post_migrate/20230404194908_remove_mr_state_id_temp_index.rb create mode 100644 db/post_migrate/20230405072302_remove_p_ci_builds_metadata_partition_id_default.rb create mode 100644 db/post_migrate/20230405094230_create_index_for_override_uuids_logic_on_vulnerability_occurrences.rb create mode 100644 db/post_migrate/20230405132104_remove_saml_provider_and_identities_non_root_group.rb create mode 100644 db/post_migrate/20230405132855_remove_scim_token_and_scim_identity_non_root_group.rb create mode 100644 db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb create mode 100644 db/post_migrate/20230406041555_allow_null_file_md5_to_debian_project_component_files.rb create mode 100644 db/post_migrate/20230406041629_allow_null_file_md5_to_debian_group_component_files.rb create mode 100644 db/post_migrate/20230406093640_requeue_backfill_admin_mode_scope_for_personal_access_tokens.rb create mode 100644 db/post_migrate/20230410111251_async_validate_fk_projects_creator_id.rb create mode 100644 db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb create mode 100644 db/post_migrate/20230412013251_ensure_system_note_metadata_bigint_backfill_is_finished_for_gitlab_dot_com.rb create mode 100644 db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb create mode 100644 db/post_migrate/20230412201517_remove_clusters_applications_cert_managers_fk.rb create mode 100644 db/post_migrate/20230412201528_remove_clusters_applications_cilium_fk.rb create mode 100644 db/post_migrate/20230412201539_remove_clusters_applications_crossplane_fk.rb create mode 100644 db/post_migrate/20230412201549_remove_clusters_applications_helm_fk.rb create mode 100644 db/post_migrate/20230412201600_remove_clusters_applications_ingress_fk.rb create mode 100644 db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb create mode 100644 db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb create mode 100644 db/post_migrate/20230412201632_remove_clusters_applications_prometheus_fk.rb create mode 100644 db/post_migrate/20230412201642_remove_clusters_applications_runners_fk.rb create mode 100644 db/post_migrate/20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb create mode 100644 db/post_migrate/20230412204143_remove_serverless_domain_cluster_pages_fk.rb create mode 100644 db/post_migrate/20230412204201_remove_serverless_domain_cluster_knative_fk.rb create mode 100644 db/post_migrate/20230412204224_remove_serverless_domain_cluster_creator_fk.rb create mode 100644 db/post_migrate/20230412214119_finalize_encrypt_ci_trigger_token.rb create mode 100644 db/post_migrate/20230413012807_remove_index_sync_index_on_merge_requests_on_state_id_and_merge_status.rb create mode 100644 db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb create mode 100644 db/post_migrate/20230413041918_add_unique_index_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230413041919_add_fk_on_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230413041920_async_validate_fk_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb create mode 100644 db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb create mode 100644 db/post_migrate/20230418154454_change_code_suggestions_default_in_namespace_settings.rb create mode 100644 db/post_migrate/20230418164957_queue_update_code_suggestions_for_namespace_settings.rb create mode 100644 db/post_migrate/20230419164438_change_code_suggestions_default_false_in_namespace_settings.rb delete mode 100644 db/schema_migrations/20210826171758 delete mode 100644 db/schema_migrations/20210826193907 delete mode 100644 db/schema_migrations/20210830085837 delete mode 100644 db/schema_migrations/20210830104800 delete mode 100644 db/schema_migrations/20210830140524 delete mode 100644 db/schema_migrations/20210830154358 delete mode 100644 db/schema_migrations/20210831123008 delete mode 100644 db/schema_migrations/20210831134840 delete mode 100644 db/schema_migrations/20210831135249 delete mode 100644 db/schema_migrations/20210831203408 delete mode 100644 db/schema_migrations/20210901044202 delete mode 100644 db/schema_migrations/20210901044237 delete mode 100644 db/schema_migrations/20210901065504 delete mode 100644 db/schema_migrations/20210901153324 delete mode 100644 db/schema_migrations/20210901184511 delete mode 100644 db/schema_migrations/20210902144144 delete mode 100644 db/schema_migrations/20210902171406 delete mode 100644 db/schema_migrations/20210902171808 delete mode 100644 db/schema_migrations/20210902184334 delete mode 100644 db/schema_migrations/20210903054158 delete mode 100644 db/schema_migrations/20210906100021 delete mode 100644 db/schema_migrations/20210906100316 delete mode 100644 db/schema_migrations/20210906130643 delete mode 100644 db/schema_migrations/20210907013944 delete mode 100644 db/schema_migrations/20210907021940 delete mode 100644 db/schema_migrations/20210907033745 delete mode 100644 db/schema_migrations/20210907041000 delete mode 100644 db/schema_migrations/20210907182337 delete mode 100644 db/schema_migrations/20210907182359 delete mode 100644 db/schema_migrations/20210907211557 delete mode 100644 db/schema_migrations/20210908060951 delete mode 100644 db/schema_migrations/20210908061132 delete mode 100644 db/schema_migrations/20210908100810 delete mode 100644 db/schema_migrations/20210908132335 delete mode 100644 db/schema_migrations/20210908140437 delete mode 100644 db/schema_migrations/20210908185736 delete mode 100644 db/schema_migrations/20210908185754 delete mode 100644 db/schema_migrations/20210908195506 delete mode 100644 db/schema_migrations/20210909104800 delete mode 100644 db/schema_migrations/20210909152027 delete mode 100644 db/schema_migrations/20210909184349 delete mode 100644 db/schema_migrations/20210910014741 delete mode 100644 db/schema_migrations/20210910015047 delete mode 100644 db/schema_migrations/20210910141043 delete mode 100644 db/schema_migrations/20210910192921 delete mode 100644 db/schema_migrations/20210910194952 delete mode 100644 db/schema_migrations/20210912034903 delete mode 100644 db/schema_migrations/20210913010411 delete mode 100644 db/schema_migrations/20210913010432 delete mode 100644 db/schema_migrations/20210913122457 delete mode 100644 db/schema_migrations/20210913224558 delete mode 100644 db/schema_migrations/20210914094840 delete mode 100644 db/schema_migrations/20210914095310 delete mode 100644 db/schema_migrations/20210914145810 delete mode 100644 db/schema_migrations/20210914172202 delete mode 100644 db/schema_migrations/20210915000453 delete mode 100644 db/schema_migrations/20210915001242 delete mode 100644 db/schema_migrations/20210915022415 delete mode 100644 db/schema_migrations/20210915070423 delete mode 100644 db/schema_migrations/20210915202900 delete mode 100644 db/schema_migrations/20210916132547 delete mode 100644 db/schema_migrations/20210917134321 delete mode 100644 db/schema_migrations/20210917153645 delete mode 100644 db/schema_migrations/20210917153905 delete mode 100644 db/schema_migrations/20210917224419 delete mode 100644 db/schema_migrations/20210918201050 delete mode 100644 db/schema_migrations/20210918202855 delete mode 100644 db/schema_migrations/20210920104446 delete mode 100644 db/schema_migrations/20210920232025 delete mode 100644 db/schema_migrations/20210921032008 delete mode 100644 db/schema_migrations/20210921062820 delete mode 100644 db/schema_migrations/20210921063924 delete mode 100644 db/schema_migrations/20210921191010 delete mode 100644 db/schema_migrations/20210922021816 delete mode 100644 db/schema_migrations/20210922025631 delete mode 100644 db/schema_migrations/20210922082019 delete mode 100644 db/schema_migrations/20210922084115 delete mode 100644 db/schema_migrations/20210922091402 delete mode 100644 db/schema_migrations/20210922172056 delete mode 100644 db/schema_migrations/20210922172156 delete mode 100644 db/schema_migrations/20210922215740 delete mode 100644 db/schema_migrations/20210922220104 delete mode 100644 db/schema_migrations/20210923042323 delete mode 100644 db/schema_migrations/20210923042324 delete mode 100644 db/schema_migrations/20210923042325 delete mode 100644 db/schema_migrations/20210923133143 delete mode 100644 db/schema_migrations/20210923135909 delete mode 100644 db/schema_migrations/20210923151641 delete mode 100644 db/schema_migrations/20210923192648 delete mode 100644 db/schema_migrations/20210923192649 delete mode 100644 db/schema_migrations/20210927153807 delete mode 100644 db/schema_migrations/20210928155022 delete mode 100644 db/schema_migrations/20210928171122 delete mode 100644 db/schema_migrations/20210929025600 delete mode 100644 db/schema_migrations/20210929030834 delete mode 100644 db/schema_migrations/20210929031049 delete mode 100644 db/schema_migrations/20210929032555 delete mode 100644 db/schema_migrations/20210929115340 delete mode 100644 db/schema_migrations/20210929121516 delete mode 100644 db/schema_migrations/20210929144453 delete mode 100644 db/schema_migrations/20210930081208 delete mode 100644 db/schema_migrations/20210930211936 delete mode 100644 db/schema_migrations/20211001001222 delete mode 100644 db/schema_migrations/20211004062942 delete mode 100644 db/schema_migrations/20211004075629 delete mode 100644 db/schema_migrations/20211004081911 delete mode 100644 db/schema_migrations/20211004110500 delete mode 100644 db/schema_migrations/20211004110927 delete mode 100644 db/schema_migrations/20211004122540 delete mode 100644 db/schema_migrations/20211004151202 delete mode 100644 db/schema_migrations/20211005010101 delete mode 100644 db/schema_migrations/20211005063519 delete mode 100644 db/schema_migrations/20211005063616 delete mode 100644 db/schema_migrations/20211005063723 delete mode 100644 db/schema_migrations/20211005083015 delete mode 100644 db/schema_migrations/20211005092428 delete mode 100644 db/schema_migrations/20211005093558 delete mode 100644 db/schema_migrations/20211005100112 delete mode 100644 db/schema_migrations/20211005112404 delete mode 100644 db/schema_migrations/20211005112645 delete mode 100644 db/schema_migrations/20211005194425 delete mode 100644 db/schema_migrations/20211006060254 delete mode 100644 db/schema_migrations/20211006060436 delete mode 100644 db/schema_migrations/20211006103122 delete mode 100644 db/schema_migrations/20211006122010 delete mode 100644 db/schema_migrations/20211006145004 delete mode 100644 db/schema_migrations/20211006174114 delete mode 100644 db/schema_migrations/20211007090229 delete mode 100644 db/schema_migrations/20211007093340 delete mode 100644 db/schema_migrations/20211007113136 delete mode 100644 db/schema_migrations/20211007155221 delete mode 100644 db/schema_migrations/20211008043855 delete mode 100644 db/schema_migrations/20211008181451 delete mode 100644 db/schema_migrations/20211008182954 delete mode 100644 db/schema_migrations/20211008193137 delete mode 100644 db/schema_migrations/20211011004242 delete mode 100644 db/schema_migrations/20211011104843 delete mode 100644 db/schema_migrations/20211011140930 delete mode 100644 db/schema_migrations/20211011140931 delete mode 100644 db/schema_migrations/20211011140932 delete mode 100644 db/schema_migrations/20211011141239 delete mode 100644 db/schema_migrations/20211011141242 delete mode 100644 db/schema_migrations/20211011141243 delete mode 100644 db/schema_migrations/20211011152701 delete mode 100644 db/schema_migrations/20211012015903 delete mode 100644 db/schema_migrations/20211012051221 delete mode 100644 db/schema_migrations/20211012091822 delete mode 100644 db/schema_migrations/20211012134316 delete mode 100644 db/schema_migrations/20211012143815 delete mode 100644 db/schema_migrations/20211012155931 delete mode 100644 db/schema_migrations/20211013014228 delete mode 100644 db/schema_migrations/20211013080714 delete mode 100644 db/schema_migrations/20211013080715 delete mode 100644 db/schema_migrations/20211013080716 delete mode 100644 db/schema_migrations/20211013125341 delete mode 100644 db/schema_migrations/20211013192749 delete mode 100644 db/schema_migrations/20211015021114 delete mode 100644 db/schema_migrations/20211015024135 delete mode 100644 db/schema_migrations/20211018101034 delete mode 100644 db/schema_migrations/20211018101552 delete mode 100644 db/schema_migrations/20211018101852 delete mode 100644 db/schema_migrations/20211018102252 delete mode 100644 db/schema_migrations/20211018123316 delete mode 100644 db/schema_migrations/20211018152654 delete mode 100644 db/schema_migrations/20211018161447 delete mode 100644 db/schema_migrations/20211019153615 delete mode 100644 db/schema_migrations/20211020030948 delete mode 100644 db/schema_migrations/20211020095357 delete mode 100644 db/schema_migrations/20211021115409 delete mode 100644 db/schema_migrations/20211021124715 delete mode 100644 db/schema_migrations/20211021125908 delete mode 100644 db/schema_migrations/20211021131217 delete mode 100644 db/schema_migrations/20211021134458 delete mode 100644 db/schema_migrations/20211021140426 delete mode 100644 db/schema_migrations/20211021141930 delete mode 100644 db/schema_migrations/20211022112202 delete mode 100644 db/schema_migrations/20211022113000 delete mode 100644 db/schema_migrations/20211022160154 delete mode 100644 db/schema_migrations/20211022214523 delete mode 100644 db/schema_migrations/20211023102243 delete mode 100644 db/schema_migrations/20211025103744 delete mode 100644 db/schema_migrations/20211025103758 delete mode 100644 db/schema_migrations/20211026070408 delete mode 100644 db/schema_migrations/20211026124336 delete mode 100644 db/schema_migrations/20211026143238 delete mode 100644 db/schema_migrations/20211027043206 delete mode 100644 db/schema_migrations/20211027043229 delete mode 100644 db/schema_migrations/20211027064021 delete mode 100644 db/schema_migrations/20211027064156 delete mode 100644 db/schema_migrations/20211027112901 delete mode 100644 db/schema_migrations/20211027203950 delete mode 100644 db/schema_migrations/20211027204011 delete mode 100644 db/schema_migrations/20211028085926 delete mode 100644 db/schema_migrations/20211028100303 delete mode 100644 db/schema_migrations/20211028100843 delete mode 100644 db/schema_migrations/20211028123412 delete mode 100644 db/schema_migrations/20211028132247 delete mode 100644 db/schema_migrations/20211028155449 delete mode 100644 db/schema_migrations/20211028212259 delete mode 100644 db/schema_migrations/20211029102822 delete mode 100644 db/schema_migrations/20211031152417 delete mode 100644 db/schema_migrations/20211031154919 delete mode 100644 db/schema_migrations/20211101132310 delete mode 100644 db/schema_migrations/20211101165656 delete mode 100644 db/schema_migrations/20211101222614 delete mode 100644 db/schema_migrations/20211102103127 delete mode 100644 db/schema_migrations/20211102114802 delete mode 100644 db/schema_migrations/20211103062728 delete mode 100644 db/schema_migrations/20211103141403 delete mode 100644 db/schema_migrations/20211103162025 delete mode 100644 db/schema_migrations/20211103184303 delete mode 100644 db/schema_migrations/20211104012209 delete mode 100644 db/schema_migrations/20211104044453 delete mode 100644 db/schema_migrations/20211104165220 delete mode 100644 db/schema_migrations/20211105010101 delete mode 100644 db/schema_migrations/20211105125756 delete mode 100644 db/schema_migrations/20211105125813 delete mode 100644 db/schema_migrations/20211105135157 delete mode 100644 db/schema_migrations/20211105160316 delete mode 100644 db/schema_migrations/20211105161404 delete mode 100644 db/schema_migrations/20211108154510 delete mode 100644 db/schema_migrations/20211108154841 delete mode 100644 db/schema_migrations/20211108203248 delete mode 100644 db/schema_migrations/20211108204736 delete mode 100644 db/schema_migrations/20211108211434 delete mode 100644 db/schema_migrations/20211109100050 delete mode 100644 db/schema_migrations/20211109101010 delete mode 100644 db/schema_migrations/20211109112454 delete mode 100644 db/schema_migrations/20211110010101 delete mode 100644 db/schema_migrations/20211110014701 delete mode 100644 db/schema_migrations/20211110015252 delete mode 100644 db/schema_migrations/20211110092710 delete mode 100644 db/schema_migrations/20211110100050 delete mode 100644 db/schema_migrations/20211110143306 delete mode 100644 db/schema_migrations/20211110151320 delete mode 100644 db/schema_migrations/20211110151350 delete mode 100644 db/schema_migrations/20211111112425 delete mode 100644 db/schema_migrations/20211111112639 delete mode 100644 db/schema_migrations/20211111112713 delete mode 100644 db/schema_migrations/20211111164025 delete mode 100644 db/schema_migrations/20211111164047 delete mode 100644 db/schema_migrations/20211112073413 delete mode 100644 db/schema_migrations/20211112113300 delete mode 100644 db/schema_migrations/20211112155416 delete mode 100644 db/schema_migrations/20211115132613 delete mode 100644 db/schema_migrations/20211115142803 delete mode 100644 db/schema_migrations/20211115142847 delete mode 100644 db/schema_migrations/20211115142911 delete mode 100644 db/schema_migrations/20211115145107 delete mode 100644 db/schema_migrations/20211115151704 delete mode 100644 db/schema_migrations/20211115154103 delete mode 100644 db/schema_migrations/20211116091751 delete mode 100644 db/schema_migrations/20211116093739 delete mode 100644 db/schema_migrations/20211116111644 delete mode 100644 db/schema_migrations/20211117084814 delete mode 100644 db/schema_migrations/20211117174209 delete mode 100644 db/schema_migrations/20211118100959 delete mode 100644 db/schema_migrations/20211118103439 delete mode 100644 db/schema_migrations/20211118114228 delete mode 100644 db/schema_migrations/20211118124537 delete mode 100644 db/schema_migrations/20211118124628 delete mode 100644 db/schema_migrations/20211118124650 delete mode 100644 db/schema_migrations/20211118130836 delete mode 100644 db/schema_migrations/20211118194239 delete mode 100644 db/schema_migrations/20211119085015 delete mode 100644 db/schema_migrations/20211119085036 delete mode 100644 db/schema_migrations/20211119111006 delete mode 100644 db/schema_migrations/20211119154221 delete mode 100644 db/schema_migrations/20211119170805 delete mode 100644 db/schema_migrations/20211119194024 delete mode 100644 db/schema_migrations/20211119195201 delete mode 100644 db/schema_migrations/20211122033501 delete mode 100644 db/schema_migrations/20211122103051 delete mode 100644 db/schema_migrations/20211122193948 delete mode 100644 db/schema_migrations/20211122215001 delete mode 100644 db/schema_migrations/20211123135255 delete mode 100644 db/schema_migrations/20211123161906 delete mode 100644 db/schema_migrations/20211123181236 delete mode 100644 db/schema_migrations/20211123182614 delete mode 100644 db/schema_migrations/20211124095704 delete mode 100644 db/schema_migrations/20211124132319 delete mode 100644 db/schema_migrations/20211124132705 delete mode 100644 db/schema_migrations/20211125120444 delete mode 100644 db/schema_migrations/20211126042235 delete mode 100644 db/schema_migrations/20211126113029 delete mode 100644 db/schema_migrations/20211126115449 delete mode 100644 db/schema_migrations/20211126142200 delete mode 100644 db/schema_migrations/20211126142354 delete mode 100644 db/schema_migrations/20211126204445 delete mode 100644 db/schema_migrations/20211129151155 delete mode 100644 db/schema_migrations/20211129151832 delete mode 100644 db/schema_migrations/20211130151724 delete mode 100644 db/schema_migrations/20211130165043 delete mode 100644 db/schema_migrations/20211130201100 delete mode 100644 db/schema_migrations/20211130201101 delete mode 100644 db/schema_migrations/20211130205719 delete mode 100644 db/schema_migrations/20211201061733 delete mode 100644 db/schema_migrations/20211201101541 delete mode 100644 db/schema_migrations/20211201143042 delete mode 100644 db/schema_migrations/20211202041233 delete mode 100644 db/schema_migrations/20211202094944 delete mode 100644 db/schema_migrations/20211202135508 delete mode 100644 db/schema_migrations/20211202145237 delete mode 100644 db/schema_migrations/20211203091642 delete mode 100644 db/schema_migrations/20211203160952 delete mode 100644 db/schema_migrations/20211203161149 delete mode 100644 db/schema_migrations/20211203161840 delete mode 100644 db/schema_migrations/20211203161942 delete mode 100644 db/schema_migrations/20211204010826 delete mode 100644 db/schema_migrations/20211206073851 delete mode 100644 db/schema_migrations/20211206074547 delete mode 100644 db/schema_migrations/20211206161271 delete mode 100644 db/schema_migrations/20211207081708 delete mode 100644 db/schema_migrations/20211207090503 delete mode 100644 db/schema_migrations/20211207125331 delete mode 100644 db/schema_migrations/20211207135331 delete mode 100644 db/schema_migrations/20211207154413 delete mode 100644 db/schema_migrations/20211207154414 delete mode 100644 db/schema_migrations/20211207165508 delete mode 100644 db/schema_migrations/20211207173510 delete mode 100644 db/schema_migrations/20211207173511 delete mode 100644 db/schema_migrations/20211208111425 delete mode 100644 db/schema_migrations/20211208122200 delete mode 100644 db/schema_migrations/20211208122201 delete mode 100644 db/schema_migrations/20211208171402 delete mode 100644 db/schema_migrations/20211209093636 delete mode 100644 db/schema_migrations/20211209093828 delete mode 100644 db/schema_migrations/20211209093923 delete mode 100644 db/schema_migrations/20211209094222 delete mode 100644 db/schema_migrations/20211209103048 delete mode 100644 db/schema_migrations/20211209203820 delete mode 100644 db/schema_migrations/20211209203821 delete mode 100644 db/schema_migrations/20211209230042 delete mode 100644 db/schema_migrations/20211210025754 delete mode 100644 db/schema_migrations/20211210031721 delete mode 100644 db/schema_migrations/20211210140000 delete mode 100644 db/schema_migrations/20211210140629 delete mode 100644 db/schema_migrations/20211210173137 delete mode 100644 db/schema_migrations/20211213064821 delete mode 100644 db/schema_migrations/20211213102111 delete mode 100644 db/schema_migrations/20211213130324 delete mode 100644 db/schema_migrations/20211213142344 delete mode 100644 db/schema_migrations/20211213154259 delete mode 100644 db/schema_migrations/20211213154704 delete mode 100644 db/schema_migrations/20211214012507 delete mode 100644 db/schema_migrations/20211214110307 delete mode 100644 db/schema_migrations/20211215090620 delete mode 100644 db/schema_migrations/20211215182006 delete mode 100644 db/schema_migrations/20211216133107 delete mode 100644 db/schema_migrations/20211216134134 delete mode 100644 db/schema_migrations/20211216135651 delete mode 100644 db/schema_migrations/20211216220939 delete mode 100644 db/schema_migrations/20211217050753 delete mode 100644 db/schema_migrations/20211217120000 delete mode 100644 db/schema_migrations/20211217145923 delete mode 100644 db/schema_migrations/20211217174331 delete mode 100644 db/schema_migrations/20211220064757 delete mode 100644 db/schema_migrations/20211220120402 delete mode 100644 db/schema_migrations/20211220123956 delete mode 100644 db/schema_migrations/20211220174504 delete mode 100644 db/schema_migrations/20211223125921 delete mode 100644 db/schema_migrations/20211224112937 delete mode 100644 db/schema_migrations/20211224114539 delete mode 100644 db/schema_migrations/20211229023654 delete mode 100644 db/schema_migrations/20211230112517 delete mode 100644 db/schema_migrations/20211230113031 delete mode 100644 db/schema_migrations/20220104060049 delete mode 100644 db/schema_migrations/20220104174445 delete mode 100644 db/schema_migrations/20220105020514 delete mode 100644 db/schema_migrations/20220105082217 delete mode 100644 db/schema_migrations/20220105121325 delete mode 100644 db/schema_migrations/20220105152547 delete mode 100644 db/schema_migrations/20220105153149 delete mode 100644 db/schema_migrations/20220106111958 delete mode 100644 db/schema_migrations/20220106112043 delete mode 100644 db/schema_migrations/20220106112085 delete mode 100644 db/schema_migrations/20220106141756 delete mode 100644 db/schema_migrations/20220106163326 delete mode 100644 db/schema_migrations/20220106185033 delete mode 100644 db/schema_migrations/20220106230629 delete mode 100644 db/schema_migrations/20220106230712 delete mode 100644 db/schema_migrations/20220106231518 delete mode 100644 db/schema_migrations/20220106233459 delete mode 100644 db/schema_migrations/20220106235626 delete mode 100644 db/schema_migrations/20220107064845 delete mode 100644 db/schema_migrations/20220107091629 delete mode 100644 db/schema_migrations/20220107165036 delete mode 100644 db/schema_migrations/20220109133006 delete mode 100644 db/schema_migrations/20220109134455 delete mode 100644 db/schema_migrations/20220110170953 delete mode 100644 db/schema_migrations/20220110171049 delete mode 100644 db/schema_migrations/20220110224913 delete mode 100644 db/schema_migrations/20220110231420 delete mode 100644 db/schema_migrations/20220110233155 delete mode 100644 db/schema_migrations/20220111002756 delete mode 100644 db/schema_migrations/20220111023852 delete mode 100644 db/schema_migrations/20220111093534 delete mode 100644 db/schema_migrations/20220111095006 delete mode 100644 db/schema_migrations/20220111095007 delete mode 100644 db/schema_migrations/20220111101421 delete mode 100644 db/schema_migrations/20220111102314 delete mode 100644 db/schema_migrations/20220111154950 delete mode 100644 db/schema_migrations/20220111154951 delete mode 100644 db/schema_migrations/20220111200254 delete mode 100644 db/schema_migrations/20220111221516 delete mode 100644 db/schema_migrations/20220112015940 delete mode 100644 db/schema_migrations/20220112090556 delete mode 100644 db/schema_migrations/20220112115413 delete mode 100644 db/schema_migrations/20220112205111 delete mode 100644 db/schema_migrations/20220112230642 delete mode 100644 db/schema_migrations/20220112232037 delete mode 100644 db/schema_migrations/20220112232605 delete mode 100644 db/schema_migrations/20220112232723 delete mode 100644 db/schema_migrations/20220113013319 delete mode 100644 db/schema_migrations/20220113014438 delete mode 100644 db/schema_migrations/20220113015830 delete mode 100644 db/schema_migrations/20220113035519 delete mode 100644 db/schema_migrations/20220113040447 delete mode 100644 db/schema_migrations/20220113111440 delete mode 100644 db/schema_migrations/20220113125401 delete mode 100644 db/schema_migrations/20220113135449 delete mode 100644 db/schema_migrations/20220113135924 delete mode 100644 db/schema_migrations/20220113164801 delete mode 100644 db/schema_migrations/20220113164901 delete mode 100644 db/schema_migrations/20220114105525 delete mode 100644 db/schema_migrations/20220114131950 delete mode 100644 db/schema_migrations/20220116175851 delete mode 100644 db/schema_migrations/20220117034056 delete mode 100644 db/schema_migrations/20220117082611 delete mode 100644 db/schema_migrations/20220117225936 delete mode 100644 db/schema_migrations/20220118015633 delete mode 100644 db/schema_migrations/20220118020026 delete mode 100644 db/schema_migrations/20220118141950 delete mode 100644 db/schema_migrations/20220118155846 delete mode 100644 db/schema_migrations/20220118155847 delete mode 100644 db/schema_migrations/20220118155848 delete mode 100644 db/schema_migrations/20220118204039 delete mode 100644 db/schema_migrations/20220119094023 delete mode 100644 db/schema_migrations/20220119094503 delete mode 100644 db/schema_migrations/20220119141407 delete mode 100644 db/schema_migrations/20220119141736 delete mode 100644 db/schema_migrations/20220119143130 delete mode 100644 db/schema_migrations/20220119144253 delete mode 100644 db/schema_migrations/20220119144458 delete mode 100644 db/schema_migrations/20220119151221 delete mode 100644 db/schema_migrations/20220119153706 delete mode 100644 db/schema_migrations/20220119154442 delete mode 100644 db/schema_migrations/20220119170426 delete mode 100644 db/schema_migrations/20220119193130 delete mode 100644 db/schema_migrations/20220119201340 delete mode 100644 db/schema_migrations/20220119203119 delete mode 100644 db/schema_migrations/20220119220620 delete mode 100644 db/schema_migrations/20220120033115 delete mode 100644 db/schema_migrations/20220120085655 delete mode 100644 db/schema_migrations/20220120094340 delete mode 100644 db/schema_migrations/20220120123700 delete mode 100644 db/schema_migrations/20220120123800 delete mode 100644 db/schema_migrations/20220120160625 delete mode 100644 db/schema_migrations/20220120211831 delete mode 100644 db/schema_migrations/20220120211832 delete mode 100644 db/schema_migrations/20220121214752 delete mode 100644 db/schema_migrations/20220121214753 delete mode 100644 db/schema_migrations/20220121221651 delete mode 100644 db/schema_migrations/20220124130028 delete mode 100644 db/schema_migrations/20220124145019 delete mode 100644 db/schema_migrations/20220124151456 delete mode 100644 db/schema_migrations/20220124151949 delete mode 100644 db/schema_migrations/20220124152824 delete mode 100644 db/schema_migrations/20220124153233 delete mode 100644 db/schema_migrations/20220124153234 delete mode 100644 db/schema_migrations/20220124180704 delete mode 100644 db/schema_migrations/20220124180705 delete mode 100644 db/schema_migrations/20220124184338 delete mode 100644 db/schema_migrations/20220124200927 delete mode 100644 db/schema_migrations/20220124204046 delete mode 100644 db/schema_migrations/20220124214131 delete mode 100644 db/schema_migrations/20220124215857 delete mode 100644 db/schema_migrations/20220124221521 delete mode 100644 db/schema_migrations/20220125083520 delete mode 100644 db/schema_migrations/20220125084127 delete mode 100644 db/schema_migrations/20220125084348 delete mode 100644 db/schema_migrations/20220125122228 delete mode 100644 db/schema_migrations/20220125122640 delete mode 100644 db/schema_migrations/20220125122725 delete mode 100644 db/schema_migrations/20220125230538 delete mode 100644 db/schema_migrations/20220126191624 delete mode 100644 db/schema_migrations/20220126201752 delete mode 100644 db/schema_migrations/20220126202654 delete mode 100644 db/schema_migrations/20220126203421 delete mode 100644 db/schema_migrations/20220126210021 delete mode 100644 db/schema_migrations/20220126210022 delete mode 100644 db/schema_migrations/20220126210657 delete mode 100644 db/schema_migrations/20220127112243 delete mode 100644 db/schema_migrations/20220127112412 delete mode 100644 db/schema_migrations/20220127132200 delete mode 100644 db/schema_migrations/20220127132201 delete mode 100644 db/schema_migrations/20220128093756 delete mode 100644 db/schema_migrations/20220128103042 delete mode 100644 db/schema_migrations/20220128155251 delete mode 100644 db/schema_migrations/20220128155814 delete mode 100644 db/schema_migrations/20220128194722 delete mode 100644 db/schema_migrations/20220131000000 delete mode 100644 db/schema_migrations/20220131000001 delete mode 100644 db/schema_migrations/20220131135725 delete mode 100644 db/schema_migrations/20220131192643 delete mode 100644 db/schema_migrations/20220201034731 delete mode 100644 db/schema_migrations/20220201141705 delete mode 100644 db/schema_migrations/20220201173212 delete mode 100644 db/schema_migrations/20220201193033 delete mode 100644 db/schema_migrations/20220201205300 delete mode 100644 db/schema_migrations/20220202034409 delete mode 100644 db/schema_migrations/20220202105733 delete mode 100644 db/schema_migrations/20220202115350 delete mode 100644 db/schema_migrations/20220203074916 delete mode 100644 db/schema_migrations/20220203091304 delete mode 100644 db/schema_migrations/20220203123333 delete mode 100644 db/schema_migrations/20220203133652 delete mode 100644 db/schema_migrations/20220203134942 delete mode 100644 db/schema_migrations/20220204053655 delete mode 100644 db/schema_migrations/20220204093120 delete mode 100644 db/schema_migrations/20220204095121 delete mode 100644 db/schema_migrations/20220204110725 delete mode 100644 db/schema_migrations/20220204154220 delete mode 100644 db/schema_migrations/20220204193000 delete mode 100644 db/schema_migrations/20220204194347 delete mode 100644 db/schema_migrations/20220207080758 delete mode 100644 db/schema_migrations/20220207083129 delete mode 100644 db/schema_migrations/20220208080921 delete mode 100644 db/schema_migrations/20220208115439 delete mode 100644 db/schema_migrations/20220208170445 delete mode 100644 db/schema_migrations/20220208171826 delete mode 100644 db/schema_migrations/20220209111007 delete mode 100644 db/schema_migrations/20220211090920 delete mode 100644 db/schema_migrations/20220211125954 delete mode 100644 db/schema_migrations/20220211214605 delete mode 100644 db/schema_migrations/20220212120735 delete mode 100644 db/schema_migrations/20220213100000 delete mode 100644 db/schema_migrations/20220213103859 delete mode 100644 db/schema_migrations/20220213104531 delete mode 100644 db/schema_migrations/20220215164709 delete mode 100644 db/schema_migrations/20220215190020 delete mode 100644 db/schema_migrations/20220216110023 delete mode 100644 db/schema_migrations/20220216201949 delete mode 100644 db/schema_migrations/20220217100008 delete mode 100644 db/schema_migrations/20220217113058 delete mode 100644 db/schema_migrations/20220217135229 delete mode 100644 db/schema_migrations/20220221102333 delete mode 100644 db/schema_migrations/20220221214928 delete mode 100644 db/schema_migrations/20220222072536 delete mode 100644 db/schema_migrations/20220222191845 delete mode 100644 db/schema_migrations/20220222192524 delete mode 100644 db/schema_migrations/20220222192525 delete mode 100644 db/schema_migrations/20220223112304 delete mode 100644 db/schema_migrations/20220223124428 delete mode 100644 db/schema_migrations/20220224000000 delete mode 100644 db/schema_migrations/20220224204415 delete mode 100644 db/schema_migrations/20220225133705 delete mode 100644 db/schema_migrations/20220301002101 delete mode 100644 db/schema_migrations/20220301003502 delete mode 100644 db/schema_migrations/20220301091503 delete mode 100644 db/schema_migrations/20220301093434 delete mode 100644 db/schema_migrations/20220301175104 delete mode 100644 db/schema_migrations/20220301175426 delete mode 100644 db/schema_migrations/20220302110724 delete mode 100644 db/schema_migrations/20220302114046 delete mode 100644 db/schema_migrations/20220302203410 delete mode 100644 db/schema_migrations/20220303190555 delete mode 100644 db/schema_migrations/20220303191047 delete mode 100644 db/schema_migrations/20220304052335 delete mode 100644 db/schema_migrations/20220304061631 delete mode 100644 db/schema_migrations/20220304062107 delete mode 100644 db/schema_migrations/20220304152729 delete mode 100644 db/schema_migrations/20220304165107 delete mode 100644 db/schema_migrations/20220304201847 delete mode 100644 db/schema_migrations/20220305223212 delete mode 100644 db/schema_migrations/20220307192534 delete mode 100644 db/schema_migrations/20220307192610 delete mode 100644 db/schema_migrations/20220307192645 delete mode 100644 db/schema_migrations/20220307192725 delete mode 100644 db/schema_migrations/20220307203458 delete mode 100644 db/schema_migrations/20220307203459 delete mode 100644 db/schema_migrations/20220308000205 delete mode 100644 db/schema_migrations/20220308115219 delete mode 100644 db/schema_migrations/20220308115502 delete mode 100644 db/schema_migrations/20220309084838 delete mode 100644 db/schema_migrations/20220309084954 delete mode 100644 db/schema_migrations/20220309100648 delete mode 100644 db/schema_migrations/20220309154855 delete mode 100644 db/schema_migrations/20220310011530 delete mode 100644 db/schema_migrations/20220310011613 delete mode 100644 db/schema_migrations/20220310095341 delete mode 100644 db/schema_migrations/20220310101118 delete mode 100644 db/schema_migrations/20220310134207 delete mode 100644 db/schema_migrations/20220310141349 delete mode 100644 db/schema_migrations/20220311010352 delete mode 100644 db/schema_migrations/20220314094841 delete mode 100644 db/schema_migrations/20220314154235 delete mode 100644 db/schema_migrations/20220314162342 create mode 100644 db/schema_migrations/20221229172604 create mode 100644 db/schema_migrations/20230127024835 create mode 100644 db/schema_migrations/20230207002330 create mode 100644 db/schema_migrations/20230209222452 create mode 100644 db/schema_migrations/20230221093535 create mode 100644 db/schema_migrations/20230221093536 create mode 100644 db/schema_migrations/20230222161226 create mode 100644 db/schema_migrations/20230222161954 create mode 100644 db/schema_migrations/20230228183644 create mode 100644 db/schema_migrations/20230301020246 create mode 100644 db/schema_migrations/20230301020356 create mode 100644 db/schema_migrations/20230303232426 create mode 100644 db/schema_migrations/20230307000000 create mode 100644 db/schema_migrations/20230307132729 create mode 100644 db/schema_migrations/20230307212637 create mode 100644 db/schema_migrations/20230308154243 create mode 100644 db/schema_migrations/20230308154244 create mode 100644 db/schema_migrations/20230308154245 create mode 100644 db/schema_migrations/20230309085547 create mode 100644 db/schema_migrations/20230313012226 create mode 100644 db/schema_migrations/20230313012609 create mode 100644 db/schema_migrations/20230313014038 create mode 100644 db/schema_migrations/20230313031351 create mode 100644 db/schema_migrations/20230313031629 create mode 100644 db/schema_migrations/20230313142631 create mode 100644 db/schema_migrations/20230313181536 create mode 100644 db/schema_migrations/20230314144640 create mode 100644 db/schema_migrations/20230314210657 create mode 100644 db/schema_migrations/20230315053635 create mode 100644 db/schema_migrations/20230315084704 create mode 100644 db/schema_migrations/20230315161408 create mode 100644 db/schema_migrations/20230316014651 create mode 100644 db/schema_migrations/20230316093433 create mode 100644 db/schema_migrations/20230316095948 create mode 100644 db/schema_migrations/20230316114426 create mode 100644 db/schema_migrations/20230316164917 create mode 100644 db/schema_migrations/20230316185746 create mode 100644 db/schema_migrations/20230317075852 create mode 100644 db/schema_migrations/20230317080000 create mode 100644 db/schema_migrations/20230317080137 create mode 100644 db/schema_migrations/20230317151841 create mode 100644 db/schema_migrations/20230317162059 create mode 100644 db/schema_migrations/20230317195228 create mode 100644 db/schema_migrations/20230319105436 create mode 100644 db/schema_migrations/20230320110802 create mode 100644 db/schema_migrations/20230320155635 create mode 100644 db/schema_migrations/20230321003252 create mode 100644 db/schema_migrations/20230321011529 create mode 100644 db/schema_migrations/20230321011903 create mode 100644 db/schema_migrations/20230321024333 create mode 100644 db/schema_migrations/20230321024903 create mode 100644 db/schema_migrations/20230321085011 create mode 100644 db/schema_migrations/20230321095759 create mode 100644 db/schema_migrations/20230321113956 create mode 100644 db/schema_migrations/20230321124837 create mode 100644 db/schema_migrations/20230321153035 create mode 100644 db/schema_migrations/20230321153304 create mode 100644 db/schema_migrations/20230321153337 create mode 100644 db/schema_migrations/20230321161218 create mode 100644 db/schema_migrations/20230321161441 create mode 100644 db/schema_migrations/20230321162810 create mode 100644 db/schema_migrations/20230321162902 create mode 100644 db/schema_migrations/20230321163051 create mode 100644 db/schema_migrations/20230321163547 create mode 100644 db/schema_migrations/20230321163947 create mode 100644 db/schema_migrations/20230321170734 create mode 100644 db/schema_migrations/20230321170803 create mode 100644 db/schema_migrations/20230321170823 create mode 100644 db/schema_migrations/20230322011220 create mode 100644 db/schema_migrations/20230322012209 create mode 100644 db/schema_migrations/20230322023442 create mode 100644 db/schema_migrations/20230322085041 create mode 100644 db/schema_migrations/20230322085852 create mode 100644 db/schema_migrations/20230322145403 create mode 100644 db/schema_migrations/20230322151605 create mode 100644 db/schema_migrations/20230322151635 create mode 100644 db/schema_migrations/20230322162512 create mode 100644 db/schema_migrations/20230322203927 create mode 100644 db/schema_migrations/20230323005730 create mode 100644 db/schema_migrations/20230323010111 create mode 100644 db/schema_migrations/20230323013251 create mode 100644 db/schema_migrations/20230323021618 create mode 100644 db/schema_migrations/20230323101138 create mode 100644 db/schema_migrations/20230323120601 create mode 100644 db/schema_migrations/20230323131521 create mode 100644 db/schema_migrations/20230323140745 create mode 100644 db/schema_migrations/20230323140746 create mode 100644 db/schema_migrations/20230323153042 create mode 100644 db/schema_migrations/20230323153328 create mode 100644 db/schema_migrations/20230323153433 create mode 100644 db/schema_migrations/20230323191750 create mode 100644 db/schema_migrations/20230327074932 create mode 100644 db/schema_migrations/20230327123333 create mode 100644 db/schema_migrations/20230327125705 create mode 100644 db/schema_migrations/20230327144152 create mode 100644 db/schema_migrations/20230328020316 create mode 100644 db/schema_migrations/20230328023535 create mode 100644 db/schema_migrations/20230328023554 create mode 100644 db/schema_migrations/20230328031720 create mode 100644 db/schema_migrations/20230328031838 create mode 100644 db/schema_migrations/20230328100534 create mode 100644 db/schema_migrations/20230328151756 create mode 100644 db/schema_migrations/20230328184031 create mode 100644 db/schema_migrations/20230329032129 create mode 100644 db/schema_migrations/20230329085754 create mode 100644 db/schema_migrations/20230329091107 create mode 100644 db/schema_migrations/20230329091300 create mode 100644 db/schema_migrations/20230329100222 create mode 100644 db/schema_migrations/20230329152410 create mode 100644 db/schema_migrations/20230329194244 create mode 100644 db/schema_migrations/20230330080731 create mode 100644 db/schema_migrations/20230330101438 create mode 100644 db/schema_migrations/20230330101439 create mode 100644 db/schema_migrations/20230330101440 create mode 100644 db/schema_migrations/20230330101441 create mode 100644 db/schema_migrations/20230330101442 create mode 100644 db/schema_migrations/20230330101443 create mode 100644 db/schema_migrations/20230330103104 create mode 100644 db/schema_migrations/20230330215636 create mode 100644 db/schema_migrations/20230331142006 create mode 100644 db/schema_migrations/20230403023440 create mode 100644 db/schema_migrations/20230403023441 create mode 100644 db/schema_migrations/20230403023828 create mode 100644 db/schema_migrations/20230403041642 create mode 100644 db/schema_migrations/20230403041917 create mode 100644 db/schema_migrations/20230403085957 create mode 100644 db/schema_migrations/20230403085958 create mode 100644 db/schema_migrations/20230403113620 create mode 100644 db/schema_migrations/20230403145705 create mode 100644 db/schema_migrations/20230403164454 create mode 100644 db/schema_migrations/20230403190527 create mode 100644 db/schema_migrations/20230403221928 create mode 100644 db/schema_migrations/20230403231455 create mode 100644 db/schema_migrations/20230403231841 create mode 100644 db/schema_migrations/20230403232121 create mode 100644 db/schema_migrations/20230404023648 create mode 100644 db/schema_migrations/20230404023915 create mode 100644 db/schema_migrations/20230404030757 create mode 100644 db/schema_migrations/20230404031041 create mode 100644 db/schema_migrations/20230404044338 create mode 100644 db/schema_migrations/20230404050414 create mode 100644 db/schema_migrations/20230404061832 create mode 100644 db/schema_migrations/20230404132544 create mode 100644 db/schema_migrations/20230404194907 create mode 100644 db/schema_migrations/20230404194908 create mode 100644 db/schema_migrations/20230405072302 create mode 100644 db/schema_migrations/20230405094230 create mode 100644 db/schema_migrations/20230405102815 create mode 100644 db/schema_migrations/20230405132104 create mode 100644 db/schema_migrations/20230405132855 create mode 100644 db/schema_migrations/20230405200858 create mode 100644 db/schema_migrations/20230406040908 create mode 100644 db/schema_migrations/20230406041555 create mode 100644 db/schema_migrations/20230406041629 create mode 100644 db/schema_migrations/20230406042906 create mode 100644 db/schema_migrations/20230406043900 create mode 100644 db/schema_migrations/20230406060452 create mode 100644 db/schema_migrations/20230406073847 create mode 100644 db/schema_migrations/20230406093640 create mode 100644 db/schema_migrations/20230406095544 create mode 100644 db/schema_migrations/20230406134436 create mode 100644 db/schema_migrations/20230406150254 create mode 100644 db/schema_migrations/20230406150354 create mode 100644 db/schema_migrations/20230406150454 create mode 100644 db/schema_migrations/20230407164616 create mode 100644 db/schema_migrations/20230410092450 create mode 100644 db/schema_migrations/20230410111251 create mode 100644 db/schema_migrations/20230411153310 create mode 100644 db/schema_migrations/20230411171001 create mode 100644 db/schema_migrations/20230412013251 create mode 100644 db/schema_migrations/20230412073614 create mode 100644 db/schema_migrations/20230412080242 create mode 100644 db/schema_migrations/20230412151659 create mode 100644 db/schema_migrations/20230412152538 create mode 100644 db/schema_migrations/20230412201517 create mode 100644 db/schema_migrations/20230412201528 create mode 100644 db/schema_migrations/20230412201539 create mode 100644 db/schema_migrations/20230412201549 create mode 100644 db/schema_migrations/20230412201600 create mode 100644 db/schema_migrations/20230412201611 create mode 100644 db/schema_migrations/20230412201621 create mode 100644 db/schema_migrations/20230412201632 create mode 100644 db/schema_migrations/20230412201642 create mode 100644 db/schema_migrations/20230412203234 create mode 100644 db/schema_migrations/20230412204143 create mode 100644 db/schema_migrations/20230412204201 create mode 100644 db/schema_migrations/20230412204224 create mode 100644 db/schema_migrations/20230412214119 create mode 100644 db/schema_migrations/20230413012807 create mode 100644 db/schema_migrations/20230413041917 create mode 100644 db/schema_migrations/20230413041918 create mode 100644 db/schema_migrations/20230413041919 create mode 100644 db/schema_migrations/20230413041920 create mode 100644 db/schema_migrations/20230413080906 create mode 100644 db/schema_migrations/20230413080918 create mode 100644 db/schema_migrations/20230413153140 create mode 100644 db/schema_migrations/20230414075119 create mode 100644 db/schema_migrations/20230418154454 create mode 100644 db/schema_migrations/20230418164957 create mode 100644 db/schema_migrations/20230419164438 (limited to 'db') 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-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_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_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, - deleted_table_name text NOT NULL, - deleted_table_primary_key_value bigint NOT NULL, - CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63)) + 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, + 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, - 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_202303 FOR VALUES FROM ('2023-03-01 00:00:00+00') TO ('2023-04-01 00:00:00+00'); -CREATE TABLE gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202212 ( +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_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_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_202301 ( +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_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_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_202302 ( +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_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_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_202303 ( +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_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_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_202304 ( +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_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_202308 FOR VALUES FROM ('2023-08-01 00:00:00+00') TO ('2023-09-01 00:00:00+00'); + +CREATE TABLE gitlab_partitions_dynamic.verification_codes_202309 ( + created_at timestamp with time zone DEFAULT now() NOT NULL, + visitor_id_code text NOT NULL, + code text NOT NULL, + phone text NOT NULL, + CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)), + CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)), + CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50)) +); +ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202309 FOR VALUES FROM ('2023-09-01 00:00:00+00') TO ('2023-10-01 00:00:00+00'); CREATE TABLE 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 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 -) -PARTITION BY HASH (stage_event_hash_id); +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 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, + 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, - start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone -); + 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, + 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,2153 +2058,602 @@ 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 product_analytics_events_experimental ( - id bigint NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 SEQUENCE product_analytics_events_experimental_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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); -ALTER SEQUENCE product_analytics_events_experimental_id_seq OWNED BY product_analytics_events_experimental.id; +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.product_analytics_events_experimental_00 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00 FOR VALUES WITH (modulus 64, remainder 0); +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.product_analytics_events_experimental_01 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01 FOR VALUES WITH (modulus 64, remainder 1); +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.product_analytics_events_experimental_02 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02 FOR VALUES WITH (modulus 64, remainder 2); +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.product_analytics_events_experimental_03 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03 FOR VALUES WITH (modulus 64, remainder 3); +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.product_analytics_events_experimental_04 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04 FOR VALUES WITH (modulus 64, remainder 4); +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.product_analytics_events_experimental_05 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05 FOR VALUES WITH (modulus 64, remainder 5); +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.product_analytics_events_experimental_06 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06 FOR VALUES WITH (modulus 64, remainder 6); +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.product_analytics_events_experimental_07 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07 FOR VALUES WITH (modulus 64, remainder 7); +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.product_analytics_events_experimental_08 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08 FOR VALUES WITH (modulus 64, remainder 8); +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.product_analytics_events_experimental_09 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09 FOR VALUES WITH (modulus 64, remainder 9); +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.product_analytics_events_experimental_10 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10 FOR VALUES WITH (modulus 64, remainder 10); +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.product_analytics_events_experimental_11 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11 FOR VALUES WITH (modulus 64, remainder 11); +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.product_analytics_events_experimental_12 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12 FOR VALUES WITH (modulus 64, remainder 12); +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.product_analytics_events_experimental_13 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13 FOR VALUES WITH (modulus 64, remainder 13); +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.product_analytics_events_experimental_14 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, - dvce_created_tstamp timestamp with time zone, - event character varying(128), - event_id character(36) NOT NULL, - txn_id integer, - name_tracker character varying(128), - v_tracker character varying(100), - v_collector character varying(100) NOT NULL, - v_etl character varying(100) NOT NULL, - user_id character varying(255), - user_ipaddress character varying(45), - user_fingerprint character varying(50), - domain_userid character varying(36), - domain_sessionidx smallint, - network_userid character varying(38), - geo_country character(2), - geo_region character(3), - geo_city character varying(75), - geo_zipcode character varying(15), - geo_latitude double precision, - geo_longitude double precision, - geo_region_name character varying(100), - ip_isp character varying(100), - ip_organization character varying(100), - ip_domain character varying(100), - ip_netspeed character varying(100), - page_url text, - page_title character varying(2000), - page_referrer text, - page_urlscheme character varying(16), - page_urlhost character varying(255), - page_urlport integer, - page_urlpath character varying(3000), - page_urlquery character varying(6000), - page_urlfragment character varying(3000), - refr_urlscheme character varying(16), - refr_urlhost character varying(255), - refr_urlport integer, - refr_urlpath character varying(6000), - refr_urlquery character varying(6000), - refr_urlfragment character varying(3000), - refr_medium character varying(25), - refr_source character varying(50), - refr_term character varying(255), - mkt_medium character varying(255), - mkt_source character varying(255), - mkt_term character varying(255), - mkt_content character varying(500), - mkt_campaign character varying(255), - se_category character varying(1000), - se_action character varying(1000), - se_label character varying(1000), - se_property character varying(1000), - se_value double precision, - tr_orderid character varying(255), - tr_affiliation character varying(255), - tr_total numeric(18,2), - tr_tax numeric(18,2), - tr_shipping numeric(18,2), - tr_city character varying(255), - tr_state character varying(255), - tr_country character varying(255), - ti_orderid character varying(255), - ti_sku character varying(255), - ti_name character varying(255), - ti_category character varying(255), - ti_price numeric(18,2), - ti_quantity integer, - pp_xoffset_min integer, - pp_xoffset_max integer, - pp_yoffset_min integer, - pp_yoffset_max integer, - useragent character varying(1000), - br_name character varying(50), - br_family character varying(50), - br_version character varying(50), - br_type character varying(50), - br_renderengine character varying(50), - br_lang character varying(255), - br_features_pdf boolean, - br_features_flash boolean, - br_features_java boolean, - br_features_director boolean, - br_features_quicktime boolean, - br_features_realplayer boolean, - br_features_windowsmedia boolean, - br_features_gears boolean, - br_features_silverlight boolean, - br_cookies boolean, - br_colordepth character varying(12), - br_viewwidth integer, - br_viewheight integer, - os_name character varying(50), - os_family character varying(50), - os_manufacturer character varying(50), - os_timezone character varying(50), - dvce_type character varying(50), - dvce_ismobile boolean, - dvce_screenwidth integer, - dvce_screenheight integer, - doc_charset character varying(128), - doc_width integer, - doc_height integer, - tr_currency character(3), - tr_total_base numeric(18,2), - tr_tax_base numeric(18,2), - tr_shipping_base numeric(18,2), - ti_currency character(3), - ti_price_base numeric(18,2), - base_currency character(3), - geo_timezone character varying(64), - mkt_clickid character varying(128), - mkt_network character varying(64), - etl_tags character varying(500), - dvce_sent_tstamp timestamp with time zone, - refr_domain_userid character varying(36), - refr_dvce_tstamp timestamp with time zone, - domain_sessionid character(36), - derived_tstamp timestamp with time zone, - event_vendor character varying(1000), - event_name character varying(1000), - event_format character varying(128), - event_version character varying(128), - event_fingerprint character varying(128), - true_tstamp timestamp with time zone +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 product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14 FOR VALUES WITH (modulus 64, remainder 14); +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.product_analytics_events_experimental_15 ( - id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, - project_id integer NOT NULL, - platform character varying(255), - etl_tstamp timestamp with time zone, - collector_tstamp timestamp with time zone NOT NULL, +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, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, dvce_created_tstamp timestamp with time zone, event character varying(128), event_id character(36) NOT NULL, @@ -3927,10 +2778,19 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_15 ( event_version character varying(128), event_fingerprint character varying(128), true_tstamp timestamp with time zone -); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15 FOR VALUES WITH (modulus 64, remainder 15); +) +PARTITION BY HASH (project_id); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_16 ( +CREATE SEQUENCE product_analytics_events_experimental_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE product_analytics_events_experimental_id_seq OWNED BY product_analytics_events_experimental.id; + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_00 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4061,9 +2921,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_16 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16 FOR VALUES WITH (modulus 64, remainder 16); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00 FOR VALUES WITH (modulus 64, remainder 0); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_17 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_01 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4194,9 +3054,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_17 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17 FOR VALUES WITH (modulus 64, remainder 17); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01 FOR VALUES WITH (modulus 64, remainder 1); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_18 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_02 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4327,9 +3187,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_18 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18 FOR VALUES WITH (modulus 64, remainder 18); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02 FOR VALUES WITH (modulus 64, remainder 2); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_19 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_03 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4460,9 +3320,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_19 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19 FOR VALUES WITH (modulus 64, remainder 19); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03 FOR VALUES WITH (modulus 64, remainder 3); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_20 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_04 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4593,9 +3453,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_20 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20 FOR VALUES WITH (modulus 64, remainder 20); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04 FOR VALUES WITH (modulus 64, remainder 4); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_21 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_05 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4726,9 +3586,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_21 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21 FOR VALUES WITH (modulus 64, remainder 21); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05 FOR VALUES WITH (modulus 64, remainder 5); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_22 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_06 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4859,9 +3719,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_22 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22 FOR VALUES WITH (modulus 64, remainder 22); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06 FOR VALUES WITH (modulus 64, remainder 6); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_23 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_07 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -4992,9 +3852,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_23 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23 FOR VALUES WITH (modulus 64, remainder 23); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07 FOR VALUES WITH (modulus 64, remainder 7); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_24 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_08 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5125,9 +3985,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_24 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24 FOR VALUES WITH (modulus 64, remainder 24); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08 FOR VALUES WITH (modulus 64, remainder 8); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_25 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_09 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5258,9 +4118,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_25 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25 FOR VALUES WITH (modulus 64, remainder 25); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09 FOR VALUES WITH (modulus 64, remainder 9); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_26 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_10 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5391,9 +4251,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_26 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26 FOR VALUES WITH (modulus 64, remainder 26); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10 FOR VALUES WITH (modulus 64, remainder 10); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_27 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_11 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5524,9 +4384,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_27 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27 FOR VALUES WITH (modulus 64, remainder 27); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11 FOR VALUES WITH (modulus 64, remainder 11); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_28 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_12 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5657,9 +4517,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_28 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28 FOR VALUES WITH (modulus 64, remainder 28); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12 FOR VALUES WITH (modulus 64, remainder 12); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_29 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_13 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5790,9 +4650,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_29 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29 FOR VALUES WITH (modulus 64, remainder 29); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13 FOR VALUES WITH (modulus 64, remainder 13); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_30 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_14 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -5923,9 +4783,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_30 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30 FOR VALUES WITH (modulus 64, remainder 30); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14 FOR VALUES WITH (modulus 64, remainder 14); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_31 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_15 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6056,9 +4916,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_31 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31 FOR VALUES WITH (modulus 64, remainder 31); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15 FOR VALUES WITH (modulus 64, remainder 15); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_32 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_16 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6189,9 +5049,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_32 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32 FOR VALUES WITH (modulus 64, remainder 32); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16 FOR VALUES WITH (modulus 64, remainder 16); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_33 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_17 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6322,9 +5182,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_33 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33 FOR VALUES WITH (modulus 64, remainder 33); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17 FOR VALUES WITH (modulus 64, remainder 17); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_34 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_18 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6455,9 +5315,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_34 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34 FOR VALUES WITH (modulus 64, remainder 34); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18 FOR VALUES WITH (modulus 64, remainder 18); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_35 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_19 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6588,9 +5448,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_35 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35 FOR VALUES WITH (modulus 64, remainder 35); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19 FOR VALUES WITH (modulus 64, remainder 19); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_36 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_20 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6721,9 +5581,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_36 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36 FOR VALUES WITH (modulus 64, remainder 36); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20 FOR VALUES WITH (modulus 64, remainder 20); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_37 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_21 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6854,9 +5714,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_37 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37 FOR VALUES WITH (modulus 64, remainder 37); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21 FOR VALUES WITH (modulus 64, remainder 21); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_38 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_22 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -6987,9 +5847,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_38 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38 FOR VALUES WITH (modulus 64, remainder 38); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22 FOR VALUES WITH (modulus 64, remainder 22); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_39 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_23 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7120,9 +5980,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_39 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39 FOR VALUES WITH (modulus 64, remainder 39); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23 FOR VALUES WITH (modulus 64, remainder 23); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_40 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_24 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7253,9 +6113,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_40 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40 FOR VALUES WITH (modulus 64, remainder 40); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24 FOR VALUES WITH (modulus 64, remainder 24); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_41 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_25 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7386,9 +6246,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_41 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41 FOR VALUES WITH (modulus 64, remainder 41); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25 FOR VALUES WITH (modulus 64, remainder 25); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_42 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_26 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7519,9 +6379,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_42 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42 FOR VALUES WITH (modulus 64, remainder 42); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26 FOR VALUES WITH (modulus 64, remainder 26); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_43 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_27 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7652,9 +6512,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_43 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43 FOR VALUES WITH (modulus 64, remainder 43); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27 FOR VALUES WITH (modulus 64, remainder 27); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_44 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_28 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7785,9 +6645,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_44 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44 FOR VALUES WITH (modulus 64, remainder 44); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28 FOR VALUES WITH (modulus 64, remainder 28); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_45 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_29 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -7918,9 +6778,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_45 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45 FOR VALUES WITH (modulus 64, remainder 45); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29 FOR VALUES WITH (modulus 64, remainder 29); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_46 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_30 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8051,9 +6911,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_46 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46 FOR VALUES WITH (modulus 64, remainder 46); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30 FOR VALUES WITH (modulus 64, remainder 30); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_47 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_31 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8184,9 +7044,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_47 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47 FOR VALUES WITH (modulus 64, remainder 47); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31 FOR VALUES WITH (modulus 64, remainder 31); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_48 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_32 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8317,9 +7177,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_48 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48 FOR VALUES WITH (modulus 64, remainder 48); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32 FOR VALUES WITH (modulus 64, remainder 32); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_49 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_33 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8450,9 +7310,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_49 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49 FOR VALUES WITH (modulus 64, remainder 49); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33 FOR VALUES WITH (modulus 64, remainder 33); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_50 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_34 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8583,9 +7443,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_50 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50 FOR VALUES WITH (modulus 64, remainder 50); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34 FOR VALUES WITH (modulus 64, remainder 34); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_51 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_35 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8716,9 +7576,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_51 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51 FOR VALUES WITH (modulus 64, remainder 51); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35 FOR VALUES WITH (modulus 64, remainder 35); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_52 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_36 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8849,9 +7709,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_52 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52 FOR VALUES WITH (modulus 64, remainder 52); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36 FOR VALUES WITH (modulus 64, remainder 36); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_53 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_37 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -8982,9 +7842,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_53 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53 FOR VALUES WITH (modulus 64, remainder 53); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37 FOR VALUES WITH (modulus 64, remainder 37); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_54 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_38 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9115,9 +7975,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_54 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54 FOR VALUES WITH (modulus 64, remainder 54); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38 FOR VALUES WITH (modulus 64, remainder 38); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_55 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_39 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9248,9 +8108,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_55 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55 FOR VALUES WITH (modulus 64, remainder 55); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39 FOR VALUES WITH (modulus 64, remainder 39); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_56 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_40 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9381,9 +8241,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_56 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56 FOR VALUES WITH (modulus 64, remainder 56); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40 FOR VALUES WITH (modulus 64, remainder 40); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_57 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_41 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9514,9 +8374,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_57 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57 FOR VALUES WITH (modulus 64, remainder 57); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41 FOR VALUES WITH (modulus 64, remainder 41); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_58 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_42 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9647,9 +8507,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_58 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58 FOR VALUES WITH (modulus 64, remainder 58); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42 FOR VALUES WITH (modulus 64, remainder 42); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_59 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_43 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9780,9 +8640,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_59 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59 FOR VALUES WITH (modulus 64, remainder 59); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43 FOR VALUES WITH (modulus 64, remainder 43); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_60 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_44 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -9913,9 +8773,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_60 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60 FOR VALUES WITH (modulus 64, remainder 60); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44 FOR VALUES WITH (modulus 64, remainder 44); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_61 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_45 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -10046,9 +8906,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_61 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61 FOR VALUES WITH (modulus 64, remainder 61); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45 FOR VALUES WITH (modulus 64, remainder 45); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_62 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_46 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -10179,9 +9039,9 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_62 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62 FOR VALUES WITH (modulus 64, remainder 62); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46 FOR VALUES WITH (modulus 64, remainder 46); -CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_63 ( +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_47 ( id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, project_id integer NOT NULL, platform character varying(255), @@ -10312,457 +9172,2671 @@ CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_63 ( event_fingerprint character varying(128), true_tstamp timestamp with time zone ); -ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63 FOR VALUES WITH (modulus 64, remainder 63); - -CREATE TABLE abuse_reports ( - id integer NOT NULL, - reporter_id integer, - user_id integer, - message text, - created_at timestamp without time zone, - updated_at timestamp without time zone, - message_html text, - cached_markdown_version integer -); - -CREATE SEQUENCE abuse_reports_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE abuse_reports_id_seq OWNED BY abuse_reports.id; - -CREATE TABLE agent_group_authorizations ( - id bigint NOT NULL, - group_id bigint NOT NULL, - agent_id bigint NOT NULL, - config jsonb NOT NULL -); - -CREATE SEQUENCE agent_group_authorizations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE agent_group_authorizations_id_seq OWNED BY agent_group_authorizations.id; - -CREATE TABLE alert_management_alert_assignees ( - id bigint NOT NULL, - user_id bigint NOT NULL, - alert_id bigint NOT NULL -); - -CREATE SEQUENCE alert_management_alert_assignees_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE alert_management_alert_assignees_id_seq OWNED BY alert_management_alert_assignees.id; - -CREATE TABLE alert_management_alert_user_mentions ( - id bigint NOT NULL, - alert_management_alert_id bigint NOT NULL, - note_id bigint, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] -); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47 FOR VALUES WITH (modulus 64, remainder 47); -CREATE SEQUENCE alert_management_alert_user_mentions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE alert_management_alert_user_mentions_id_seq OWNED BY alert_management_alert_user_mentions.id; - -CREATE TABLE alert_management_alerts ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - started_at timestamp with time zone NOT NULL, - ended_at timestamp with time zone, - events integer DEFAULT 1 NOT NULL, - iid integer NOT NULL, - severity smallint DEFAULT 0 NOT NULL, - status smallint DEFAULT 0 NOT NULL, - fingerprint bytea, - issue_id bigint, - project_id bigint NOT NULL, - title text NOT NULL, - description text, - service text, - monitoring_tool text, - hosts text[] DEFAULT '{}'::text[] NOT NULL, - payload jsonb DEFAULT '{}'::jsonb NOT NULL, - prometheus_alert_id integer, - environment_id integer, - domain smallint DEFAULT 0, - CONSTRAINT check_2df3e2fdc1 CHECK ((char_length(monitoring_tool) <= 100)), - CONSTRAINT check_5e9e57cadb CHECK ((char_length(description) <= 1000)), - CONSTRAINT check_bac14dddde CHECK ((char_length(service) <= 100)), - CONSTRAINT check_d1d1c2d14c CHECK ((char_length(title) <= 200)) -); - -CREATE SEQUENCE alert_management_alerts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE alert_management_alerts_id_seq OWNED BY alert_management_alerts.id; - -CREATE TABLE alert_management_http_integrations ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - active boolean DEFAULT false NOT NULL, - encrypted_token text NOT NULL, - encrypted_token_iv text NOT NULL, - endpoint_identifier text NOT NULL, - name text NOT NULL, - payload_example jsonb DEFAULT '{}'::jsonb NOT NULL, - payload_attribute_mapping jsonb DEFAULT '{}'::jsonb NOT NULL, - CONSTRAINT check_286943b636 CHECK ((char_length(encrypted_token_iv) <= 255)), - CONSTRAINT check_392143ccf4 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_e270820180 CHECK ((char_length(endpoint_identifier) <= 255)), - CONSTRAINT check_f68577c4af CHECK ((char_length(encrypted_token) <= 255)) -); - -CREATE SEQUENCE alert_management_http_integrations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE alert_management_http_integrations_id_seq OWNED BY alert_management_http_integrations.id; - -CREATE TABLE allowed_email_domains ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id integer NOT NULL, - domain character varying(255) NOT NULL -); - -CREATE SEQUENCE allowed_email_domains_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE allowed_email_domains_id_seq OWNED BY allowed_email_domains.id; - -CREATE TABLE analytics_cycle_analytics_group_stages ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - relative_position integer, - start_event_identifier integer NOT NULL, - end_event_identifier integer NOT NULL, - group_id bigint NOT NULL, - start_event_label_id bigint, - end_event_label_id bigint, - hidden boolean DEFAULT false NOT NULL, - custom boolean DEFAULT true NOT NULL, - name character varying(255) NOT NULL, - group_value_stream_id bigint NOT NULL, - stage_event_hash_id bigint, - CONSTRAINT check_e6bd4271b5 CHECK ((stage_event_hash_id IS NOT NULL)) -); - -CREATE SEQUENCE analytics_cycle_analytics_group_stages_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_cycle_analytics_group_stages_id_seq OWNED BY analytics_cycle_analytics_group_stages.id; - -CREATE TABLE analytics_cycle_analytics_group_value_streams ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_bc1ed5f1f7 CHECK ((char_length(name) <= 100)) +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_48 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone ); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48 FOR VALUES WITH (modulus 64, remainder 48); -CREATE SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq OWNED BY analytics_cycle_analytics_group_value_streams.id; - -CREATE TABLE analytics_cycle_analytics_project_stages ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - relative_position integer, - start_event_identifier integer NOT NULL, - end_event_identifier integer NOT NULL, - project_id bigint NOT NULL, - start_event_label_id bigint, - end_event_label_id bigint, - hidden boolean DEFAULT false NOT NULL, - custom boolean DEFAULT true NOT NULL, - name character varying(255) NOT NULL, - project_value_stream_id bigint NOT NULL, - stage_event_hash_id bigint, - CONSTRAINT check_8f6019de1e CHECK ((stage_event_hash_id IS NOT NULL)) -); - -CREATE SEQUENCE analytics_cycle_analytics_project_stages_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_cycle_analytics_project_stages_id_seq OWNED BY analytics_cycle_analytics_project_stages.id; - -CREATE TABLE analytics_cycle_analytics_project_value_streams ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_9b1970a898 CHECK ((char_length(name) <= 100)) -); - -CREATE SEQUENCE analytics_cycle_analytics_project_value_streams_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_cycle_analytics_project_value_streams_id_seq OWNED BY analytics_cycle_analytics_project_value_streams.id; - -CREATE TABLE analytics_cycle_analytics_stage_event_hashes ( - id bigint NOT NULL, - hash_sha256 bytea -); - -CREATE SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq OWNED BY analytics_cycle_analytics_stage_event_hashes.id; - -CREATE TABLE analytics_devops_adoption_segments ( - id bigint NOT NULL, - last_recorded_at timestamp with time zone, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - namespace_id integer, - display_namespace_id integer -); - -CREATE SEQUENCE analytics_devops_adoption_segments_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_devops_adoption_segments_id_seq OWNED BY analytics_devops_adoption_segments.id; - -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, - merge_request_approved boolean NOT NULL, - runner_configured boolean NOT NULL, - pipeline_succeeded boolean NOT NULL, - deploy_succeeded boolean NOT NULL, - security_scan_succeeded boolean NOT NULL, - end_time timestamp with time zone NOT NULL, - total_projects_count integer, - code_owners_used_count integer, - namespace_id integer, - sast_enabled_count integer, - dast_enabled_count integer, - dependency_scanning_enabled_count integer, - coverage_fuzzing_enabled_count integer, - vulnerability_management_used_count integer, - CONSTRAINT check_3f472de131 CHECK ((namespace_id IS NOT NULL)) -); - -CREATE SEQUENCE analytics_devops_adoption_snapshots_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_devops_adoption_snapshots_id_seq OWNED BY analytics_devops_adoption_snapshots.id; - -CREATE TABLE analytics_language_trend_repository_languages ( - file_count integer DEFAULT 0 NOT NULL, - programming_language_id bigint NOT NULL, - project_id bigint NOT NULL, - loc integer DEFAULT 0 NOT NULL, - bytes integer DEFAULT 0 NOT NULL, - percentage smallint DEFAULT 0 NOT NULL, - snapshot_date date NOT NULL -); - -CREATE TABLE analytics_usage_trends_measurements ( - id bigint NOT NULL, - count bigint NOT NULL, - recorded_at timestamp with time zone NOT NULL, - identifier smallint NOT NULL +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_49 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone ); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49 FOR VALUES WITH (modulus 64, remainder 49); -CREATE SEQUENCE analytics_usage_trends_measurements_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE analytics_usage_trends_measurements_id_seq OWNED BY analytics_usage_trends_measurements.id; - -CREATE TABLE appearances ( - id integer NOT NULL, - title character varying NOT NULL, - description text NOT NULL, - header_logo character varying, - logo character varying, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - description_html text, - cached_markdown_version integer, - favicon character varying, - new_project_guidelines text, - new_project_guidelines_html text, - header_message text, - header_message_html text, - footer_message text, - footer_message_html text, - message_background_color text, - message_font_color text, - email_header_and_footer_enabled boolean DEFAULT false NOT NULL, - updated_by integer, - profile_image_guidelines text, - profile_image_guidelines_html text, - CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)) -); - -CREATE SEQUENCE appearances_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE appearances_id_seq OWNED BY appearances.id; - -CREATE TABLE application_setting_terms ( - id integer NOT NULL, - cached_markdown_version integer, - terms text NOT NULL, - terms_html text +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_50 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone ); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50 FOR VALUES WITH (modulus 64, remainder 50); -CREATE SEQUENCE application_setting_terms_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE application_setting_terms_id_seq OWNED BY application_setting_terms.id; - -CREATE TABLE application_settings ( - id integer NOT NULL, - default_projects_limit integer, - signup_enabled boolean, - gravatar_enabled boolean, - sign_in_text text, - created_at timestamp without time zone, - updated_at timestamp without time zone, - home_page_url character varying, - default_branch_protection integer DEFAULT 2, - restricted_visibility_levels text, - version_check_enabled boolean DEFAULT true, - max_attachment_size integer DEFAULT 10 NOT NULL, - default_project_visibility integer DEFAULT 0 NOT NULL, - default_snippet_visibility integer DEFAULT 0 NOT NULL, - user_oauth_applications boolean DEFAULT true, - after_sign_out_path character varying, - session_expire_delay integer DEFAULT 10080 NOT NULL, - import_sources text, - help_page_text text, - shared_runners_enabled boolean DEFAULT true NOT NULL, - max_artifacts_size integer DEFAULT 100 NOT NULL, - runners_registration_token character varying, - max_pages_size integer DEFAULT 100 NOT NULL, - require_two_factor_authentication boolean DEFAULT false, - two_factor_grace_period integer DEFAULT 48, - metrics_enabled boolean DEFAULT false, - metrics_host character varying DEFAULT 'localhost'::character varying, - metrics_pool_size integer DEFAULT 16, - metrics_timeout integer DEFAULT 10, - metrics_method_call_threshold integer DEFAULT 10, - recaptcha_enabled boolean DEFAULT false, - metrics_port integer DEFAULT 8089, - akismet_enabled boolean DEFAULT false, - metrics_sample_interval integer DEFAULT 15, - email_author_in_body boolean DEFAULT false, - default_group_visibility integer, - repository_checks_enabled boolean DEFAULT false, - shared_runners_text text, - metrics_packet_size integer DEFAULT 1, - disabled_oauth_sign_in_sources text, - health_check_access_token character varying, - send_user_confirmation_email boolean DEFAULT false, - container_registry_token_expire_delay integer DEFAULT 5, - after_sign_up_text text, - user_default_external boolean DEFAULT false NOT NULL, - repository_storages character varying DEFAULT 'default'::character varying, - enabled_git_access_protocol character varying, - usage_ping_enabled boolean DEFAULT true NOT NULL, - sign_in_text_html text, - help_page_text_html text, - shared_runners_text_html text, - after_sign_up_text_html text, - rsa_key_restriction integer DEFAULT 0 NOT NULL, - dsa_key_restriction integer DEFAULT '-1'::integer NOT NULL, - ecdsa_key_restriction integer DEFAULT 0 NOT NULL, - ed25519_key_restriction integer DEFAULT 0 NOT NULL, - housekeeping_enabled boolean DEFAULT true NOT NULL, - housekeeping_bitmaps_enabled boolean DEFAULT true NOT NULL, - housekeeping_incremental_repack_period integer DEFAULT 10 NOT NULL, - housekeeping_full_repack_period integer DEFAULT 50 NOT NULL, - housekeeping_gc_period integer DEFAULT 200 NOT NULL, - html_emails_enabled boolean DEFAULT true, - plantuml_url character varying, - plantuml_enabled boolean, +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_51 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51 FOR VALUES WITH (modulus 64, remainder 51); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_52 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52 FOR VALUES WITH (modulus 64, remainder 52); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_53 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53 FOR VALUES WITH (modulus 64, remainder 53); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_54 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54 FOR VALUES WITH (modulus 64, remainder 54); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_55 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55 FOR VALUES WITH (modulus 64, remainder 55); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_56 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56 FOR VALUES WITH (modulus 64, remainder 56); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_57 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57 FOR VALUES WITH (modulus 64, remainder 57); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_58 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58 FOR VALUES WITH (modulus 64, remainder 58); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_59 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59 FOR VALUES WITH (modulus 64, remainder 59); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_60 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60 FOR VALUES WITH (modulus 64, remainder 60); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_61 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61 FOR VALUES WITH (modulus 64, remainder 61); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_62 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62 FOR VALUES WITH (modulus 64, remainder 62); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_63 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63 FOR VALUES WITH (modulus 64, remainder 63); + +CREATE TABLE abuse_reports ( + id integer NOT NULL, + reporter_id integer, + user_id integer, + message text, + created_at timestamp without time zone, + updated_at timestamp without time zone, + message_html text, + cached_markdown_version integer +); + +CREATE SEQUENCE abuse_reports_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + agent_id bigint NOT NULL, + config jsonb NOT NULL +); + +CREATE SEQUENCE agent_group_authorizations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + alert_id bigint NOT NULL +); + +CREATE SEQUENCE alert_management_alert_assignees_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + note_id bigint, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE alert_management_alert_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_alert_user_mentions_id_seq OWNED BY alert_management_alert_user_mentions.id; + +CREATE TABLE alert_management_alerts ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + started_at timestamp with time zone NOT NULL, + ended_at timestamp with time zone, + events integer DEFAULT 1 NOT NULL, + iid integer NOT NULL, + severity smallint DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + fingerprint bytea, + issue_id bigint, + project_id bigint NOT NULL, + title text NOT NULL, + description text, + service text, + monitoring_tool text, + hosts text[] DEFAULT '{}'::text[] NOT NULL, + payload jsonb DEFAULT '{}'::jsonb NOT NULL, + prometheus_alert_id integer, + environment_id integer, + domain smallint DEFAULT 0, + CONSTRAINT check_2df3e2fdc1 CHECK ((char_length(monitoring_tool) <= 100)), + CONSTRAINT check_5e9e57cadb CHECK ((char_length(description) <= 1000)), + CONSTRAINT check_bac14dddde CHECK ((char_length(service) <= 100)), + CONSTRAINT check_d1d1c2d14c CHECK ((char_length(title) <= 200)) +); + +CREATE SEQUENCE alert_management_alerts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_alerts_id_seq OWNED BY alert_management_alerts.id; + +CREATE TABLE alert_management_http_integrations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + active boolean DEFAULT false NOT NULL, + encrypted_token text NOT NULL, + encrypted_token_iv text NOT NULL, + endpoint_identifier text NOT NULL, + name text NOT NULL, + payload_example jsonb DEFAULT '{}'::jsonb NOT NULL, + payload_attribute_mapping jsonb DEFAULT '{}'::jsonb NOT NULL, + CONSTRAINT check_286943b636 CHECK ((char_length(encrypted_token_iv) <= 255)), + CONSTRAINT check_392143ccf4 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e270820180 CHECK ((char_length(endpoint_identifier) <= 255)), + CONSTRAINT check_f68577c4af CHECK ((char_length(encrypted_token) <= 255)) +); + +CREATE SEQUENCE alert_management_http_integrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_http_integrations_id_seq OWNED BY alert_management_http_integrations.id; + +CREATE TABLE allowed_email_domains ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id integer NOT NULL, + domain character varying(255) NOT NULL +); + +CREATE SEQUENCE allowed_email_domains_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + updated_at timestamp with time zone NOT NULL, + relative_position integer, + start_event_identifier integer NOT NULL, + end_event_identifier integer NOT NULL, + group_id bigint NOT NULL, + start_event_label_id bigint, + end_event_label_id bigint, + hidden boolean DEFAULT false NOT NULL, + custom boolean DEFAULT true NOT NULL, + name character varying(255) NOT NULL, + group_value_stream_id bigint NOT NULL, + stage_event_hash_id bigint, + CONSTRAINT check_e6bd4271b5 CHECK ((stage_event_hash_id IS NOT NULL)) +); + +CREATE SEQUENCE analytics_cycle_analytics_group_stages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_group_stages_id_seq OWNED BY analytics_cycle_analytics_group_stages.id; + +CREATE TABLE analytics_cycle_analytics_group_value_streams ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_bc1ed5f1f7 CHECK ((char_length(name) <= 100)) +); + +CREATE SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq OWNED BY analytics_cycle_analytics_group_value_streams.id; + +CREATE TABLE analytics_cycle_analytics_project_stages ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + relative_position integer, + start_event_identifier integer NOT NULL, + end_event_identifier integer NOT NULL, + project_id bigint NOT NULL, + start_event_label_id bigint, + end_event_label_id bigint, + hidden boolean DEFAULT false NOT NULL, + custom boolean DEFAULT true NOT NULL, + name character varying(255) NOT NULL, + project_value_stream_id bigint NOT NULL, + stage_event_hash_id bigint, + CONSTRAINT check_8f6019de1e CHECK ((stage_event_hash_id IS NOT NULL)) +); + +CREATE SEQUENCE analytics_cycle_analytics_project_stages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_project_stages_id_seq OWNED BY analytics_cycle_analytics_project_stages.id; + +CREATE TABLE analytics_cycle_analytics_project_value_streams ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_9b1970a898 CHECK ((char_length(name) <= 100)) +); + +CREATE SEQUENCE analytics_cycle_analytics_project_value_streams_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_project_value_streams_id_seq OWNED BY analytics_cycle_analytics_project_value_streams.id; + +CREATE TABLE analytics_cycle_analytics_stage_event_hashes ( + id bigint NOT NULL, + hash_sha256 bytea +); + +CREATE SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq OWNED BY analytics_cycle_analytics_stage_event_hashes.id; + +CREATE TABLE analytics_devops_adoption_segments ( + id bigint NOT NULL, + last_recorded_at timestamp with time zone, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id integer, + display_namespace_id integer +); + +CREATE SEQUENCE analytics_devops_adoption_segments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_devops_adoption_segments_id_seq OWNED BY analytics_devops_adoption_segments.id; + +CREATE TABLE analytics_devops_adoption_snapshots ( + id bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + issue_opened boolean NOT NULL, + merge_request_opened boolean NOT NULL, + merge_request_approved boolean NOT NULL, + runner_configured boolean NOT NULL, + pipeline_succeeded boolean NOT NULL, + deploy_succeeded boolean NOT NULL, + security_scan_succeeded boolean, + end_time timestamp with time zone NOT NULL, + total_projects_count integer, + code_owners_used_count integer, + namespace_id integer, + sast_enabled_count integer, + dast_enabled_count integer, + dependency_scanning_enabled_count integer, + coverage_fuzzing_enabled_count integer, + vulnerability_management_used_count integer, + CONSTRAINT check_3f472de131 CHECK ((namespace_id IS NOT NULL)) +); + +CREATE SEQUENCE analytics_devops_adoption_snapshots_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_devops_adoption_snapshots_id_seq OWNED BY analytics_devops_adoption_snapshots.id; + +CREATE TABLE analytics_language_trend_repository_languages ( + file_count integer DEFAULT 0 NOT NULL, + programming_language_id bigint NOT NULL, + project_id bigint NOT NULL, + loc integer DEFAULT 0 NOT NULL, + bytes integer DEFAULT 0 NOT NULL, + percentage smallint DEFAULT 0 NOT NULL, + snapshot_date date NOT NULL +); + +CREATE TABLE analytics_usage_trends_measurements ( + id bigint NOT NULL, + count bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + identifier smallint NOT NULL +); + +CREATE SEQUENCE analytics_usage_trends_measurements_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_usage_trends_measurements_id_seq OWNED BY analytics_usage_trends_measurements.id; + +CREATE TABLE appearances ( + id integer NOT NULL, + title character varying NOT NULL, + description text NOT NULL, + header_logo character varying, + logo character varying, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + description_html text, + cached_markdown_version integer, + favicon character varying, + new_project_guidelines text, + new_project_guidelines_html text, + header_message text, + header_message_html text, + footer_message text, + footer_message_html text, + message_background_color text, + message_font_color text, + email_header_and_footer_enabled boolean DEFAULT false NOT NULL, + updated_by integer, + profile_image_guidelines text, + profile_image_guidelines_html text, + CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)) +); + +CREATE SEQUENCE appearances_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE appearances_id_seq OWNED BY appearances.id; + +CREATE TABLE application_setting_terms ( + id integer NOT NULL, + cached_markdown_version integer, + terms text NOT NULL, + terms_html text +); + +CREATE SEQUENCE application_setting_terms_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE application_setting_terms_id_seq OWNED BY application_setting_terms.id; + +CREATE TABLE application_settings ( + id integer NOT NULL, + default_projects_limit integer, + signup_enabled boolean, + gravatar_enabled boolean, + sign_in_text text, + created_at timestamp without time zone, + updated_at timestamp without time zone, + home_page_url character varying, + default_branch_protection integer DEFAULT 2, + restricted_visibility_levels text, + version_check_enabled boolean DEFAULT true, + max_attachment_size integer DEFAULT 10 NOT NULL, + default_project_visibility integer DEFAULT 0 NOT NULL, + default_snippet_visibility integer DEFAULT 0 NOT NULL, + user_oauth_applications boolean DEFAULT true, + after_sign_out_path character varying, + session_expire_delay integer DEFAULT 10080 NOT NULL, + import_sources text, + help_page_text text, + shared_runners_enabled boolean DEFAULT true NOT NULL, + max_artifacts_size integer DEFAULT 100 NOT NULL, + runners_registration_token character varying, + max_pages_size integer DEFAULT 100 NOT NULL, + require_two_factor_authentication boolean DEFAULT false, + two_factor_grace_period integer DEFAULT 48, + metrics_enabled boolean DEFAULT false, + metrics_host character varying DEFAULT 'localhost'::character varying, + metrics_pool_size integer DEFAULT 16, + metrics_timeout integer DEFAULT 10, + metrics_method_call_threshold integer DEFAULT 10, + recaptcha_enabled boolean DEFAULT false, + metrics_port integer DEFAULT 8089, + akismet_enabled boolean DEFAULT false, + metrics_sample_interval integer DEFAULT 15, + email_author_in_body boolean DEFAULT false, + default_group_visibility integer, + repository_checks_enabled boolean DEFAULT false, + shared_runners_text text, + metrics_packet_size integer DEFAULT 1, + disabled_oauth_sign_in_sources text, + health_check_access_token character varying, + send_user_confirmation_email boolean DEFAULT false, + container_registry_token_expire_delay integer DEFAULT 5, + after_sign_up_text text, + user_default_external boolean DEFAULT false NOT NULL, + repository_storages character varying DEFAULT 'default'::character varying, + enabled_git_access_protocol character varying, + usage_ping_enabled boolean DEFAULT true NOT NULL, + sign_in_text_html text, + help_page_text_html text, + shared_runners_text_html text, + after_sign_up_text_html text, + rsa_key_restriction integer DEFAULT 0 NOT NULL, + dsa_key_restriction integer DEFAULT '-1'::integer NOT NULL, + ecdsa_key_restriction integer DEFAULT 0 NOT NULL, + ed25519_key_restriction integer DEFAULT 0 NOT NULL, + housekeeping_enabled boolean DEFAULT true NOT NULL, + housekeeping_bitmaps_enabled boolean DEFAULT true NOT NULL, + housekeeping_incremental_repack_period integer DEFAULT 10 NOT NULL, + housekeeping_full_repack_period integer DEFAULT 50 NOT NULL, + housekeeping_gc_period integer DEFAULT 200 NOT NULL, + html_emails_enabled boolean DEFAULT true, + plantuml_url character varying, + plantuml_enabled boolean, terminal_max_session_time integer DEFAULT 0 NOT NULL, unique_ips_limit_per_user integer, unique_ips_limit_time_window 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,7 +12187,7289 @@ CREATE TABLE application_settings ( CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)) ); -CREATE SEQUENCE application_settings_id_seq +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 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE application_settings_id_seq OWNED BY application_settings.id; + +CREATE TABLE approval_merge_request_rule_sources ( + id bigint NOT NULL, + approval_merge_request_rule_id bigint NOT NULL, + approval_project_rule_id bigint NOT NULL +); + +CREATE SEQUENCE approval_merge_request_rule_sources_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_merge_request_rule_sources_id_seq OWNED BY approval_merge_request_rule_sources.id; + +CREATE TABLE approval_merge_request_rules ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + merge_request_id integer NOT NULL, + approvals_required smallint DEFAULT 0 NOT NULL, + name character varying NOT NULL, + rule_type smallint DEFAULT 1 NOT NULL, + 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)) +); + +CREATE TABLE approval_merge_request_rules_approved_approvers ( + id bigint NOT NULL, + approval_merge_request_rule_id bigint NOT NULL, + user_id integer NOT NULL +); + +CREATE SEQUENCE approval_merge_request_rules_approved_approvers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_merge_request_rules_approved_approvers_id_seq OWNED BY approval_merge_request_rules_approved_approvers.id; + +CREATE TABLE approval_merge_request_rules_groups ( + id bigint NOT NULL, + approval_merge_request_rule_id bigint NOT NULL, + group_id integer NOT NULL +); + +CREATE SEQUENCE approval_merge_request_rules_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_merge_request_rules_groups_id_seq OWNED BY approval_merge_request_rules_groups.id; + +CREATE SEQUENCE approval_merge_request_rules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_merge_request_rules_id_seq OWNED BY approval_merge_request_rules.id; + +CREATE TABLE approval_merge_request_rules_users ( + id bigint NOT NULL, + approval_merge_request_rule_id bigint NOT NULL, + user_id integer NOT NULL +); + +CREATE SEQUENCE approval_merge_request_rules_users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_merge_request_rules_users_id_seq OWNED BY approval_merge_request_rules_users.id; + +CREATE TABLE approval_project_rules ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + approvals_required smallint DEFAULT 0 NOT NULL, + name character varying NOT NULL, + rule_type smallint DEFAULT 0 NOT NULL, + scanners text[], + vulnerabilities_allowed smallint DEFAULT 0 NOT NULL, + severity_levels text[] DEFAULT '{}'::text[] NOT NULL, + report_type smallint, + vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL, + orchestration_policy_idx smallint +); + +CREATE TABLE approval_project_rules_groups ( + id bigint NOT NULL, + approval_project_rule_id bigint NOT NULL, + group_id integer NOT NULL +); + +CREATE SEQUENCE approval_project_rules_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_project_rules_groups_id_seq OWNED BY approval_project_rules_groups.id; + +CREATE SEQUENCE approval_project_rules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_project_rules_id_seq OWNED BY approval_project_rules.id; + +CREATE TABLE approval_project_rules_protected_branches ( + approval_project_rule_id bigint NOT NULL, + protected_branch_id bigint NOT NULL +); + +CREATE TABLE approval_project_rules_users ( + id bigint NOT NULL, + approval_project_rule_id bigint NOT NULL, + user_id integer NOT NULL +); + +CREATE SEQUENCE approval_project_rules_users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approval_project_rules_users_id_seq OWNED BY approval_project_rules_users.id; + +CREATE TABLE approvals ( + id integer NOT NULL, + merge_request_id integer NOT NULL, + user_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE approvals_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approvals_id_seq OWNED BY approvals.id; + +CREATE TABLE approver_groups ( + id integer NOT NULL, + target_id integer NOT NULL, + target_type character varying NOT NULL, + group_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE approver_groups_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approver_groups_id_seq OWNED BY approver_groups.id; + +CREATE TABLE approvers ( + id integer NOT NULL, + target_id integer NOT NULL, + target_type character varying, + user_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE approvers_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE approvers_id_seq OWNED BY approvers.id; + +CREATE TABLE atlassian_identities ( + user_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + expires_at timestamp with time zone, + extern_uid text NOT NULL, + encrypted_token bytea, + encrypted_token_iv bytea, + encrypted_refresh_token bytea, + encrypted_refresh_token_iv bytea, + CONSTRAINT atlassian_identities_refresh_token_iv_length_constraint CHECK ((octet_length(encrypted_refresh_token_iv) <= 12)), + CONSTRAINT atlassian_identities_refresh_token_length_constraint CHECK ((octet_length(encrypted_refresh_token) <= 512)), + CONSTRAINT atlassian_identities_token_iv_length_constraint CHECK ((octet_length(encrypted_token_iv) <= 12)), + CONSTRAINT atlassian_identities_token_length_constraint CHECK ((octet_length(encrypted_token) <= 2048)), + CONSTRAINT check_32f5779763 CHECK ((char_length(extern_uid) <= 255)) +); + +CREATE SEQUENCE atlassian_identities_user_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE atlassian_identities_user_id_seq OWNED BY atlassian_identities.user_id; + +CREATE TABLE audit_events_external_audit_event_destinations ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + destination_url text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + 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 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE audit_events_external_audit_event_destinations_id_seq OWNED BY audit_events_external_audit_event_destinations.id; + +CREATE TABLE authentication_events ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + user_id bigint, + result smallint NOT NULL, + ip_address inet, + provider text NOT NULL, + user_name text NOT NULL, + CONSTRAINT check_45a6cc4e80 CHECK ((char_length(user_name) <= 255)), + CONSTRAINT check_c64f424630 CHECK ((char_length(provider) <= 64)) +); + +CREATE SEQUENCE authentication_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE authentication_events_id_seq OWNED BY authentication_events.id; + +CREATE TABLE award_emoji ( + id integer NOT NULL, + name character varying, + user_id integer, + awardable_type character varying, + awardable_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE award_emoji_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE award_emoji_id_seq OWNED BY award_emoji.id; + +CREATE TABLE aws_roles ( + user_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + role_arn character varying(2048), + role_external_id character varying(64) NOT NULL, + region text, + CONSTRAINT check_57adedab55 CHECK ((char_length(region) <= 255)) +); + +CREATE TABLE background_migration_jobs ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + class_name text NOT NULL, + arguments jsonb NOT NULL, + CONSTRAINT check_b0de0a5852 CHECK ((char_length(class_name) <= 200)) +); + +CREATE SEQUENCE background_migration_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE background_migration_jobs_id_seq OWNED BY background_migration_jobs.id; + +CREATE TABLE badges ( + id integer NOT NULL, + link_url character varying NOT NULL, + image_url character varying NOT NULL, + project_id integer, + group_id integer, + type character varying NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name character varying(255) +); + +CREATE SEQUENCE badges_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE badges_id_seq OWNED BY badges.id; + +CREATE TABLE banned_users ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL +); + +CREATE TABLE batched_background_migration_jobs ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + started_at timestamp with time zone, + finished_at timestamp with time zone, + batched_background_migration_id bigint NOT NULL, + min_value bigint NOT NULL, + max_value bigint NOT NULL, + batch_size integer NOT NULL, + sub_batch_size integer NOT NULL, + status smallint DEFAULT 0 NOT NULL, + attempts smallint DEFAULT 0 NOT NULL, + metrics jsonb DEFAULT '{}'::jsonb NOT NULL, + pause_ms integer DEFAULT 100 NOT NULL +); + +CREATE SEQUENCE batched_background_migration_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE batched_background_migration_jobs_id_seq OWNED BY batched_background_migration_jobs.id; + +CREATE TABLE batched_background_migrations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + min_value bigint DEFAULT 1 NOT NULL, + max_value bigint NOT NULL, + batch_size integer NOT NULL, + sub_batch_size integer NOT NULL, + "interval" smallint NOT NULL, + status smallint DEFAULT 0 NOT NULL, + job_class_name text NOT NULL, + batch_class_name text DEFAULT 'PrimaryKeyBatchingStrategy'::text NOT NULL, + table_name text NOT NULL, + column_name text NOT NULL, + job_arguments jsonb DEFAULT '"[]"'::jsonb NOT NULL, + 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)), + CONSTRAINT check_e6c75b1e29 CHECK ((char_length(job_class_name) <= 100)), + CONSTRAINT check_fe10674721 CHECK ((char_length(batch_class_name) <= 100)), + CONSTRAINT check_max_value_in_range CHECK ((max_value >= min_value)), + CONSTRAINT check_positive_min_value CHECK ((min_value > 0)), + CONSTRAINT check_positive_sub_batch_size CHECK ((sub_batch_size > 0)) +); + +CREATE SEQUENCE batched_background_migrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE batched_background_migrations_id_seq OWNED BY batched_background_migrations.id; + +CREATE TABLE board_assignees ( + id integer NOT NULL, + board_id integer NOT NULL, + assignee_id integer NOT NULL +); + +CREATE SEQUENCE board_assignees_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_assignees_id_seq OWNED BY board_assignees.id; + +CREATE TABLE board_group_recent_visits ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id integer, + board_id integer, + group_id integer +); + +CREATE SEQUENCE board_group_recent_visits_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_group_recent_visits_id_seq OWNED BY board_group_recent_visits.id; + +CREATE TABLE board_labels ( + id integer NOT NULL, + board_id integer NOT NULL, + label_id integer NOT NULL +); + +CREATE SEQUENCE board_labels_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_labels_id_seq OWNED BY board_labels.id; + +CREATE TABLE board_project_recent_visits ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id integer, + project_id integer, + board_id integer +); + +CREATE SEQUENCE board_project_recent_visits_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_project_recent_visits_id_seq OWNED BY board_project_recent_visits.id; + +CREATE TABLE board_user_preferences ( + id bigint NOT NULL, + user_id bigint NOT NULL, + board_id bigint NOT NULL, + hide_labels boolean, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE board_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_user_preferences_id_seq OWNED BY board_user_preferences.id; + +CREATE TABLE boards ( + id integer NOT NULL, + project_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + group_id integer, + milestone_id integer, + weight integer, + name character varying DEFAULT 'Development'::character varying NOT NULL, + hide_backlog_list boolean DEFAULT false NOT NULL, + hide_closed_list boolean DEFAULT false NOT NULL, + iteration_id bigint, + iteration_cadence_id bigint +); + +CREATE TABLE boards_epic_board_labels ( + id bigint NOT NULL, + epic_board_id bigint NOT NULL, + label_id bigint NOT NULL +); + +CREATE SEQUENCE boards_epic_board_labels_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_board_labels_id_seq OWNED BY boards_epic_board_labels.id; + +CREATE TABLE boards_epic_board_positions ( + id bigint NOT NULL, + epic_board_id bigint NOT NULL, + epic_id bigint NOT NULL, + relative_position integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE boards_epic_board_positions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_board_positions_id_seq OWNED BY boards_epic_board_positions.id; + +CREATE TABLE boards_epic_board_recent_visits ( + id bigint NOT NULL, + user_id bigint NOT NULL, + epic_board_id bigint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE boards_epic_board_recent_visits_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_board_recent_visits_id_seq OWNED BY boards_epic_board_recent_visits.id; + +CREATE TABLE boards_epic_boards ( + id bigint NOT NULL, + hide_backlog_list boolean DEFAULT false NOT NULL, + hide_closed_list boolean DEFAULT false NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text DEFAULT 'Development'::text NOT NULL, + CONSTRAINT check_bcbbffe601 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE boards_epic_boards_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_boards_id_seq OWNED BY boards_epic_boards.id; + +CREATE TABLE boards_epic_list_user_preferences ( + id bigint NOT NULL, + user_id bigint NOT NULL, + epic_list_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + collapsed boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE boards_epic_list_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_list_user_preferences_id_seq OWNED BY boards_epic_list_user_preferences.id; + +CREATE TABLE boards_epic_lists ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + epic_board_id bigint NOT NULL, + label_id bigint, + "position" integer, + list_type smallint DEFAULT 1 NOT NULL, + CONSTRAINT boards_epic_lists_position_constraint CHECK (((list_type <> 1) OR (("position" IS NOT NULL) AND ("position" >= 0)))) +); + +CREATE SEQUENCE boards_epic_lists_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_lists_id_seq OWNED BY boards_epic_lists.id; + +CREATE TABLE boards_epic_user_preferences ( + id bigint NOT NULL, + board_id bigint NOT NULL, + user_id bigint NOT NULL, + epic_id bigint NOT NULL, + collapsed boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE boards_epic_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_user_preferences_id_seq OWNED BY boards_epic_user_preferences.id; + +CREATE SEQUENCE boards_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_id_seq OWNED BY boards.id; + +CREATE TABLE broadcast_messages ( + id integer NOT NULL, + message text NOT NULL, + starts_at timestamp without time zone NOT NULL, + ends_at timestamp without time zone NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + color character varying, + font character varying, + message_html text NOT NULL, + cached_markdown_version integer, + dismissable boolean, + target_path character varying(255), + broadcast_type smallint DEFAULT 1 NOT NULL, + target_access_levels integer[] DEFAULT '{}'::integer[] NOT NULL +); + +CREATE SEQUENCE broadcast_messages_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE broadcast_messages_id_seq OWNED BY broadcast_messages.id; + +CREATE TABLE bulk_import_configurations ( + id bigint NOT NULL, + bulk_import_id integer NOT NULL, + encrypted_url text, + encrypted_url_iv text, + encrypted_access_token text, + encrypted_access_token_iv text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE bulk_import_configurations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_configurations_id_seq OWNED BY bulk_import_configurations.id; + +CREATE TABLE bulk_import_entities ( + id bigint NOT NULL, + bulk_import_id bigint NOT NULL, + parent_id bigint, + namespace_id bigint, + project_id bigint, + source_type smallint NOT NULL, + source_full_path text NOT NULL, + destination_name text NOT NULL, + destination_namespace text NOT NULL, + status smallint NOT NULL, + jid text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)), + CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)), + CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)), + CONSTRAINT check_b834fff4d9 CHECK ((char_length(destination_namespace) <= 255)) +); + +CREATE SEQUENCE bulk_import_entities_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_entities_id_seq OWNED BY bulk_import_entities.id; + +CREATE TABLE bulk_import_export_uploads ( + id bigint NOT NULL, + export_id bigint NOT NULL, + updated_at timestamp with time zone NOT NULL, + export_file text, + CONSTRAINT check_5add76239d CHECK ((char_length(export_file) <= 255)) +); + +CREATE SEQUENCE bulk_import_export_uploads_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_export_uploads_id_seq OWNED BY bulk_import_export_uploads.id; + +CREATE TABLE bulk_import_exports ( + id bigint NOT NULL, + group_id bigint, + project_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + relation text NOT NULL, + jid text, + error text, + CONSTRAINT check_24cb010672 CHECK ((char_length(relation) <= 255)), + CONSTRAINT check_8f0f357334 CHECK ((char_length(error) <= 255)), + CONSTRAINT check_9ee6d14d33 CHECK ((char_length(jid) <= 255)) +); + +CREATE SEQUENCE bulk_import_exports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_exports_id_seq OWNED BY bulk_import_exports.id; + +CREATE TABLE bulk_import_failures ( + id bigint NOT NULL, + bulk_import_entity_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + pipeline_class text NOT NULL, + exception_class text NOT NULL, + exception_message text NOT NULL, + correlation_id_value text, + pipeline_step text, + CONSTRAINT check_053d65c7a4 CHECK ((char_length(pipeline_class) <= 255)), + CONSTRAINT check_6eca8f972e CHECK ((char_length(exception_message) <= 255)), + CONSTRAINT check_721a422375 CHECK ((char_length(pipeline_step) <= 255)), + CONSTRAINT check_c7dba8398e CHECK ((char_length(exception_class) <= 255)), + CONSTRAINT check_e787285882 CHECK ((char_length(correlation_id_value) <= 255)) +); + +CREATE SEQUENCE bulk_import_failures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_failures_id_seq OWNED BY bulk_import_failures.id; + +CREATE TABLE bulk_import_trackers ( + id bigint NOT NULL, + bulk_import_entity_id bigint NOT NULL, + relation text NOT NULL, + next_page text, + has_next_page boolean DEFAULT false NOT NULL, + jid text, + stage smallint DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_2d45cae629 CHECK ((char_length(relation) <= 255)), + CONSTRAINT check_40aeaa600b CHECK ((char_length(next_page) <= 255)), + CONSTRAINT check_603f91cb06 CHECK ((char_length(jid) <= 255)), + CONSTRAINT check_next_page_requirement CHECK (((has_next_page IS FALSE) OR (next_page IS NOT NULL))) +); + +CREATE SEQUENCE bulk_import_trackers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_trackers_id_seq OWNED BY bulk_import_trackers.id; + +CREATE TABLE bulk_imports ( + id bigint NOT NULL, + user_id integer NOT NULL, + 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, + source_version text, + CONSTRAINT check_ea4e58775a CHECK ((char_length(source_version) <= 63)) +); + +CREATE SEQUENCE bulk_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_imports_id_seq OWNED BY bulk_imports.id; + +CREATE TABLE chat_names ( + id integer NOT NULL, + user_id integer NOT NULL, + service_id integer NOT NULL, + team_id character varying NOT NULL, + team_domain character varying, + chat_id character varying NOT NULL, + chat_name character varying, + last_used_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE chat_names_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE chat_names_id_seq OWNED BY chat_names.id; + +CREATE TABLE chat_teams ( + id integer NOT NULL, + namespace_id integer NOT NULL, + team_id character varying, + name character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE chat_teams_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE chat_teams_id_seq OWNED BY chat_teams.id; + +CREATE TABLE ci_build_needs ( + id integer NOT NULL, + name text NOT NULL, + artifacts boolean DEFAULT true NOT NULL, + optional boolean DEFAULT false NOT NULL, + build_id bigint NOT NULL +); + +CREATE SEQUENCE ci_build_needs_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_needs_id_seq OWNED BY ci_build_needs.id; + +CREATE TABLE ci_build_pending_states ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + build_id bigint NOT NULL, + state smallint, + failure_reason smallint, + trace_checksum bytea, + trace_bytesize bigint +); + +CREATE SEQUENCE ci_build_pending_states_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_pending_states_id_seq OWNED BY ci_build_pending_states.id; + +CREATE TABLE ci_build_report_results ( + build_id bigint NOT NULL, + project_id bigint NOT NULL, + data jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE ci_build_report_results_build_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_report_results_build_id_seq OWNED BY ci_build_report_results.build_id; + +CREATE TABLE ci_build_trace_chunks ( + id bigint NOT NULL, + chunk_index integer NOT NULL, + data_store integer NOT NULL, + raw_data bytea, + checksum bytea, + lock_version integer DEFAULT 0 NOT NULL, + build_id bigint NOT NULL +); + +CREATE SEQUENCE ci_build_trace_chunks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_trace_chunks_id_seq OWNED BY ci_build_trace_chunks.id; + +CREATE TABLE ci_build_trace_metadata ( + build_id bigint NOT NULL, + trace_artifact_id bigint, + archival_attempts smallint DEFAULT 0 NOT NULL, + checksum bytea, + remote_checksum bytea, + last_archival_attempt_at timestamp with time zone, + archived_at timestamp with time zone +); + +CREATE TABLE ci_builds ( + status character varying, + finished_at timestamp without time zone, + trace text, + created_at timestamp without time zone, + updated_at timestamp without time zone, + started_at timestamp without time zone, + runner_id integer, + coverage double precision, + commit_id integer, + name character varying, + options text, + allow_failure boolean DEFAULT false NOT NULL, + stage character varying, + trigger_request_id integer, + stage_idx integer, + tag boolean, + ref character varying, + user_id integer, + type character varying, + target_url character varying, + description character varying, + project_id integer, + erased_by_id integer, + erased_at timestamp without time zone, + artifacts_expire_at timestamp without time zone, + environment character varying, + "when" character varying, + yaml_variables text, + queued_at timestamp without time zone, + token character varying, + lock_version integer DEFAULT 0, + coverage_regex character varying, + auto_canceled_by_id integer, + retried boolean, + protected boolean, + failure_reason integer, + scheduled_at timestamp with time zone, + token_encrypted character varying, + upstream_pipeline_id integer, + processed boolean, + resource_group_id bigint, + waiting_for_resource_at timestamp with time zone, + scheduling_type smallint, + id bigint NOT NULL, + stage_id bigint +); + +CREATE SEQUENCE ci_builds_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id; + +CREATE TABLE ci_builds_metadata ( + project_id integer NOT NULL, + timeout integer, + timeout_source integer DEFAULT 1 NOT NULL, + config_options jsonb, + config_variables jsonb, + interruptible boolean, + has_exposed_artifacts boolean, + environment_auto_stop_in character varying(255), + expanded_environment_name character varying(255), + secrets jsonb DEFAULT '{}'::jsonb NOT NULL, + build_id bigint NOT NULL, + id bigint NOT NULL, + runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE ci_builds_metadata_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY ci_builds_metadata.id; + +CREATE TABLE ci_builds_runner_session ( + id bigint NOT NULL, + url character varying NOT NULL, + certificate character varying, + "authorization" character varying, + build_id bigint NOT NULL +); + +CREATE SEQUENCE ci_builds_runner_session_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_builds_runner_session_id_seq OWNED BY ci_builds_runner_session.id; + +CREATE TABLE ci_daily_build_group_report_results ( + id bigint NOT NULL, + date date NOT NULL, + project_id bigint NOT NULL, + last_pipeline_id bigint NOT NULL, + ref_path text NOT NULL, + group_name text NOT NULL, + data jsonb NOT NULL, + default_branch boolean DEFAULT false NOT NULL, + group_id bigint +); + +CREATE SEQUENCE ci_daily_build_group_report_results_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_daily_build_group_report_results_id_seq OWNED BY ci_daily_build_group_report_results.id; + +CREATE TABLE ci_deleted_objects ( + id bigint NOT NULL, + file_store smallint DEFAULT 1 NOT NULL, + pick_up_at timestamp with time zone DEFAULT now() NOT NULL, + store_dir text NOT NULL, + file text NOT NULL, + CONSTRAINT check_5e151d6912 CHECK ((char_length(store_dir) <= 1024)) +); + +CREATE SEQUENCE ci_deleted_objects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_deleted_objects_id_seq OWNED BY ci_deleted_objects.id; + +CREATE TABLE ci_freeze_periods ( + id bigint NOT NULL, + project_id bigint NOT NULL, + freeze_start text NOT NULL, + freeze_end text NOT NULL, + cron_timezone text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_4a7939e04e CHECK ((char_length(freeze_end) <= 998)), + CONSTRAINT check_a92607bd2b CHECK ((char_length(freeze_start) <= 998)), + CONSTRAINT check_b14055adc3 CHECK ((char_length(cron_timezone) <= 255)) +); + +CREATE SEQUENCE ci_freeze_periods_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_freeze_periods_id_seq OWNED BY ci_freeze_periods.id; + +CREATE TABLE ci_group_variables ( + id integer NOT NULL, + key character varying NOT NULL, + value text, + encrypted_value text, + encrypted_value_salt character varying, + encrypted_value_iv character varying, + group_id integer NOT NULL, + protected boolean DEFAULT false NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + masked boolean DEFAULT false NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL, + environment_scope text DEFAULT '*'::text NOT NULL, + CONSTRAINT check_dfe009485a CHECK ((char_length(environment_scope) <= 255)) +); + +CREATE SEQUENCE ci_group_variables_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_group_variables_id_seq OWNED BY ci_group_variables.id; + +CREATE TABLE ci_instance_variables ( + id bigint NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL, + masked boolean DEFAULT false, + protected boolean DEFAULT false, + key text NOT NULL, + encrypted_value text, + encrypted_value_iv text, + CONSTRAINT check_07a45a5bcb CHECK ((char_length(encrypted_value_iv) <= 255)), + CONSTRAINT check_5aede12208 CHECK ((char_length(key) <= 255)), + CONSTRAINT check_956afd70f1 CHECK ((char_length(encrypted_value) <= 13579)) +); + +CREATE SEQUENCE ci_instance_variables_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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 ( + project_id integer NOT NULL, + file_type integer NOT NULL, + size bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + expire_at timestamp with time zone, + file character varying, + file_store integer DEFAULT 1, + file_sha256 bytea, + file_format smallint, + file_location smallint, + id bigint NOT NULL, + job_id bigint NOT NULL, + locked smallint DEFAULT 2, + 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 + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_job_artifacts_id_seq OWNED BY ci_job_artifacts.id; + +CREATE TABLE ci_job_token_project_scope_links ( + id bigint NOT NULL, + source_project_id bigint NOT NULL, + target_project_id bigint NOT NULL, + added_by_id bigint, + created_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE ci_job_token_project_scope_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_job_token_project_scope_links_id_seq OWNED BY ci_job_token_project_scope_links.id; + +CREATE TABLE ci_job_variables ( + id bigint NOT NULL, + key character varying NOT NULL, + encrypted_value text, + encrypted_value_iv character varying, + job_id bigint NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL, + source smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE ci_job_variables_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_job_variables_id_seq OWNED BY ci_job_variables.id; + +CREATE TABLE ci_minutes_additional_packs ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id bigint NOT NULL, + expires_at date, + number_of_minutes integer NOT NULL, + purchase_xid text, + CONSTRAINT check_d7ef254af0 CHECK ((char_length(purchase_xid) <= 50)) +); + +CREATE SEQUENCE ci_minutes_additional_packs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + date date NOT NULL, + additional_amount_available integer DEFAULT 0 NOT NULL, + amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, + notification_level smallint DEFAULT 100 NOT NULL, + shared_runners_duration integer DEFAULT 0 NOT NULL, + created_at timestamp with time zone, + CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) +); + +CREATE SEQUENCE ci_namespace_monthly_usages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id; + +CREATE TABLE ci_pending_builds ( + id bigint NOT NULL, + build_id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + protected boolean DEFAULT false NOT NULL, + instance_runners_enabled boolean DEFAULT false NOT NULL, + namespace_id bigint, + minutes_exceeded boolean DEFAULT false NOT NULL, + tag_ids integer[] DEFAULT '{}'::integer[], + namespace_traversal_ids integer[] DEFAULT '{}'::integer[] +); + +CREATE SEQUENCE ci_pending_builds_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pending_builds_id_seq OWNED BY ci_pending_builds.id; + +CREATE TABLE ci_pipeline_artifacts ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + pipeline_id bigint NOT NULL, + project_id bigint NOT NULL, + size integer NOT NULL, + file_store smallint DEFAULT 1 NOT NULL, + file_type smallint NOT NULL, + file_format smallint NOT NULL, + file text, + expire_at timestamp with time zone, + verification_started_at timestamp with time zone, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_state smallint DEFAULT 0 NOT NULL, + verification_retry_count smallint, + verification_checksum bytea, + verification_failure text, + CONSTRAINT check_191b5850ec CHECK ((char_length(file) <= 255)), + CONSTRAINT check_abeeb71caf CHECK ((file IS NOT NULL)), + CONSTRAINT ci_pipeline_artifacts_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE SEQUENCE ci_pipeline_artifacts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_artifacts_id_seq OWNED BY ci_pipeline_artifacts.id; + +CREATE TABLE ci_pipeline_chat_data ( + id bigint NOT NULL, + pipeline_id integer NOT NULL, + chat_name_id integer NOT NULL, + response_url text NOT NULL +); + +CREATE SEQUENCE ci_pipeline_chat_data_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_chat_data_id_seq OWNED BY ci_pipeline_chat_data.id; + +CREATE TABLE ci_pipeline_messages ( + id bigint NOT NULL, + severity smallint DEFAULT 0 NOT NULL, + pipeline_id integer NOT NULL, + content text NOT NULL, + CONSTRAINT check_58ca2981b2 CHECK ((char_length(content) <= 10000)) +); + +CREATE SEQUENCE ci_pipeline_messages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id; + +CREATE TABLE ci_pipeline_schedule_variables ( + id integer NOT NULL, + key character varying NOT NULL, + value text, + encrypted_value text, + encrypted_value_salt character varying, + encrypted_value_iv character varying, + pipeline_schedule_id integer NOT NULL, + created_at timestamp with time zone, + updated_at timestamp with time zone, + variable_type smallint DEFAULT 1 NOT NULL +); + +CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_schedule_variables_id_seq OWNED BY ci_pipeline_schedule_variables.id; + +CREATE TABLE ci_pipeline_schedules ( + id integer NOT NULL, + description character varying, + ref character varying, + cron character varying, + cron_timezone character varying, + next_run_at timestamp without time zone, + project_id integer, + owner_id integer, + active boolean DEFAULT true, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE ci_pipeline_schedules_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_schedules_id_seq OWNED BY ci_pipeline_schedules.id; + +CREATE TABLE ci_pipeline_variables ( + id integer NOT NULL, + key character varying NOT NULL, + value text, + encrypted_value text, + encrypted_value_salt character varying, + encrypted_value_iv character varying, + pipeline_id integer NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL +); + +CREATE SEQUENCE ci_pipeline_variables_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_variables_id_seq OWNED BY ci_pipeline_variables.id; + +CREATE TABLE ci_pipelines ( + id integer NOT NULL, + ref character varying, + sha character varying, + before_sha character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + tag boolean DEFAULT false, + yaml_errors text, + committed_at timestamp without time zone, + project_id integer, + status character varying, + started_at timestamp without time zone, + finished_at timestamp without time zone, + duration integer, + user_id integer, + lock_version integer DEFAULT 0, + auto_canceled_by_id integer, + pipeline_schedule_id integer, + source integer, + protected boolean, + config_source integer, + failure_reason integer, + iid integer, + merge_request_id integer, + source_sha bytea, + target_sha bytea, + external_pull_request_id bigint, + ci_ref_id bigint, + locked smallint DEFAULT 1 NOT NULL +); + +CREATE TABLE ci_pipelines_config ( + pipeline_id bigint NOT NULL, + content text NOT NULL +); + +CREATE SEQUENCE ci_pipelines_config_pipeline_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipelines_config_pipeline_id_seq OWNED BY ci_pipelines_config.pipeline_id; + +CREATE SEQUENCE ci_pipelines_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipelines_id_seq OWNED BY ci_pipelines.id; + +CREATE TABLE ci_platform_metrics ( + id bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + platform_target text NOT NULL, + count integer NOT NULL, + CONSTRAINT check_f922abc32b CHECK ((char_length(platform_target) <= 255)), + CONSTRAINT ci_platform_metrics_check_count_positive CHECK ((count > 0)) +); + +CREATE SEQUENCE ci_platform_metrics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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))) +); + +CREATE SEQUENCE ci_project_monthly_usages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_project_monthly_usages_id_seq OWNED BY ci_project_monthly_usages.id; + +CREATE TABLE ci_refs ( + id bigint NOT NULL, + project_id bigint NOT NULL, + lock_version integer DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + ref_path text NOT NULL +); + +CREATE SEQUENCE ci_refs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_refs_id_seq OWNED BY ci_refs.id; + +CREATE TABLE ci_resource_groups ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + key character varying(255) NOT NULL, + process_mode smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE ci_resource_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_resource_groups_id_seq OWNED BY ci_resource_groups.id; + +CREATE TABLE ci_resources ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + resource_group_id bigint NOT NULL, + build_id bigint +); + +CREATE SEQUENCE ci_resources_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_resources_id_seq OWNED BY ci_resources.id; + +CREATE TABLE ci_runner_namespaces ( + id integer NOT NULL, + runner_id integer, + namespace_id integer +); + +CREATE SEQUENCE ci_runner_namespaces_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_runner_namespaces_id_seq OWNED BY ci_runner_namespaces.id; + +CREATE TABLE ci_runner_projects ( + id integer NOT NULL, + runner_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + project_id integer +); + +CREATE SEQUENCE ci_runner_projects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_runner_projects_id_seq OWNED BY ci_runner_projects.id; + +CREATE TABLE ci_runners ( + id integer NOT NULL, + token character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + description character varying, + contacted_at timestamp without time zone, + active boolean DEFAULT true NOT NULL, + name character varying, + version character varying, + revision character varying, + platform character varying, + architecture character varying, + run_untagged boolean DEFAULT true NOT NULL, + locked boolean DEFAULT false NOT NULL, + access_level integer DEFAULT 0 NOT NULL, + maximum_timeout integer, + ip_address character varying, + runner_type smallint NOT NULL, + 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, + 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 + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_runners_id_seq OWNED BY ci_runners.id; + +CREATE TABLE ci_running_builds ( + id bigint NOT NULL, + build_id bigint NOT NULL, + project_id bigint NOT NULL, + runner_id bigint NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + runner_type smallint NOT NULL +); + +CREATE SEQUENCE ci_running_builds_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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_pipeline_id integer, + source_job_id bigint +); + +CREATE SEQUENCE ci_sources_pipelines_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_sources_pipelines_id_seq OWNED BY ci_sources_pipelines.id; + +CREATE TABLE ci_sources_projects ( + id bigint NOT NULL, + pipeline_id bigint NOT NULL, + source_project_id bigint NOT NULL +); + +CREATE SEQUENCE ci_sources_projects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_sources_projects_id_seq OWNED BY ci_sources_projects.id; + +CREATE TABLE ci_stages ( + project_id integer, + pipeline_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + name character varying, + status integer, + lock_version integer DEFAULT 0, + "position" integer, + id bigint NOT NULL +); + +CREATE SEQUENCE ci_stages_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_stages_id_seq OWNED BY ci_stages.id; + +CREATE TABLE ci_subscriptions_projects ( + id bigint NOT NULL, + downstream_project_id bigint NOT NULL, + upstream_project_id bigint NOT NULL +); + +CREATE SEQUENCE ci_subscriptions_projects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_subscriptions_projects_id_seq OWNED BY ci_subscriptions_projects.id; + +CREATE TABLE ci_trigger_requests ( + id integer NOT NULL, + trigger_id integer NOT NULL, + variables text, + created_at timestamp without time zone, + updated_at timestamp without time zone, + commit_id integer +); + +CREATE SEQUENCE ci_trigger_requests_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_trigger_requests_id_seq OWNED BY ci_trigger_requests.id; + +CREATE TABLE ci_triggers ( + id integer NOT NULL, + token character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + project_id integer, + owner_id integer NOT NULL, + description character varying, + ref character varying +); + +CREATE SEQUENCE ci_triggers_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_triggers_id_seq OWNED BY ci_triggers.id; + +CREATE TABLE ci_unit_test_failures ( + id bigint NOT NULL, + failed_at timestamp with time zone NOT NULL, + unit_test_id bigint NOT NULL, + build_id bigint NOT NULL +); + +CREATE SEQUENCE ci_unit_test_failures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_unit_test_failures_id_seq OWNED BY ci_unit_test_failures.id; + +CREATE TABLE ci_unit_tests ( + id bigint NOT NULL, + project_id bigint NOT NULL, + key_hash text NOT NULL, + name text NOT NULL, + suite_name text NOT NULL, + CONSTRAINT check_248fae1a3b CHECK ((char_length(name) <= 255)), + CONSTRAINT check_b288215ffe CHECK ((char_length(key_hash) <= 64)), + CONSTRAINT check_c2d57b3c49 CHECK ((char_length(suite_name) <= 255)) +); + +CREATE SEQUENCE ci_unit_tests_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_unit_tests_id_seq OWNED BY ci_unit_tests.id; + +CREATE TABLE ci_variables ( + id integer NOT NULL, + key character varying NOT NULL, + value text, + encrypted_value text, + encrypted_value_salt character varying, + encrypted_value_iv character varying, + project_id integer NOT NULL, + protected boolean DEFAULT false NOT NULL, + environment_scope character varying DEFAULT '*'::character varying NOT NULL, + masked boolean DEFAULT false NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL +); + +CREATE SEQUENCE ci_variables_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_variables_id_seq OWNED BY ci_variables.id; + +CREATE TABLE cluster_agent_tokens ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + agent_id bigint NOT NULL, + token_encrypted text NOT NULL, + created_by_user_id bigint, + 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)), + CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255)) +); + +CREATE SEQUENCE cluster_agent_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_agent_tokens_id_seq OWNED BY cluster_agent_tokens.id; + +CREATE TABLE cluster_agents ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + name text NOT NULL, + created_by_user_id bigint, + CONSTRAINT check_3498369510 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE cluster_agents_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_agents_id_seq OWNED BY cluster_agents.id; + +CREATE TABLE cluster_groups ( + id integer NOT NULL, + cluster_id integer NOT NULL, + group_id integer NOT NULL +); + +CREATE SEQUENCE cluster_groups_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_groups_id_seq OWNED BY cluster_groups.id; + +CREATE TABLE cluster_platforms_kubernetes ( + id integer NOT NULL, + cluster_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + api_url text, + ca_cert text, + namespace character varying, + username character varying, + encrypted_password text, + encrypted_password_iv character varying, + encrypted_token text, + encrypted_token_iv character varying, + authorization_type smallint +); + +CREATE SEQUENCE cluster_platforms_kubernetes_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_platforms_kubernetes_id_seq OWNED BY cluster_platforms_kubernetes.id; + +CREATE TABLE cluster_projects ( + id integer NOT NULL, + project_id integer NOT NULL, + cluster_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE cluster_projects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_projects_id_seq OWNED BY cluster_projects.id; + +CREATE TABLE cluster_providers_aws ( + id bigint NOT NULL, + cluster_id bigint NOT NULL, + num_nodes integer NOT NULL, + status integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + key_name character varying(255) NOT NULL, + role_arn character varying(2048) NOT NULL, + region character varying(255) NOT NULL, + vpc_id character varying(255) NOT NULL, + subnet_ids character varying(255)[] DEFAULT '{}'::character varying[] NOT NULL, + security_group_id character varying(255) NOT NULL, + instance_type character varying(255) NOT NULL, + access_key_id character varying(255), + encrypted_secret_access_key_iv character varying(255), + encrypted_secret_access_key text, + session_token text, + status_reason text, + kubernetes_version text DEFAULT '1.14'::text NOT NULL, + CONSTRAINT check_f1f42cd85e CHECK ((char_length(kubernetes_version) <= 30)) +); + +CREATE SEQUENCE cluster_providers_aws_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_providers_aws_id_seq OWNED BY cluster_providers_aws.id; + +CREATE TABLE cluster_providers_gcp ( + id integer NOT NULL, + cluster_id integer NOT NULL, + status integer, + num_nodes integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status_reason text, + gcp_project_id character varying NOT NULL, + zone character varying NOT NULL, + machine_type character varying, + operation_id character varying, + endpoint character varying, + encrypted_access_token text, + encrypted_access_token_iv character varying, + legacy_abac boolean DEFAULT false NOT NULL, + cloud_run boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE cluster_providers_gcp_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_providers_gcp_id_seq OWNED BY cluster_providers_gcp.id; + +CREATE TABLE clusters ( + id integer NOT NULL, + user_id integer, + provider_type integer, + platform_type integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + enabled boolean DEFAULT true, + name character varying NOT NULL, + environment_scope character varying DEFAULT '*'::character varying NOT NULL, + cluster_type smallint DEFAULT 3 NOT NULL, + domain character varying, + managed boolean DEFAULT true NOT NULL, + namespace_per_environment boolean DEFAULT true NOT NULL, + cleanup_status smallint DEFAULT 1 NOT NULL, + cleanup_status_reason text, + management_project_id integer, + helm_major_version integer DEFAULT 3 NOT NULL +); + +CREATE TABLE clusters_applications_cert_managers ( + id integer NOT NULL, + cluster_id integer NOT NULL, + status integer NOT NULL, + version character varying NOT NULL, + email character varying NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_cert_managers_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_cert_managers_id_seq OWNED BY clusters_applications_cert_managers.id; + +CREATE TABLE clusters_applications_cilium ( + id bigint NOT NULL, + cluster_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_cilium_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_cilium_id_seq OWNED BY clusters_applications_cilium.id; + +CREATE TABLE clusters_applications_crossplane ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + cluster_id bigint NOT NULL, + status integer NOT NULL, + version character varying(255) NOT NULL, + stack character varying(255) NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_crossplane_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_crossplane_id_seq OWNED BY clusters_applications_crossplane.id; + +CREATE TABLE clusters_applications_elastic_stacks ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + cluster_id bigint NOT NULL, + status integer NOT NULL, + version character varying(255) NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id; + +CREATE TABLE clusters_applications_helm ( + id integer NOT NULL, + cluster_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + version character varying NOT NULL, + status_reason text, + encrypted_ca_key text, + encrypted_ca_key_iv text, + ca_cert text +); + +CREATE SEQUENCE clusters_applications_helm_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_helm_id_seq OWNED BY clusters_applications_helm.id; + +CREATE TABLE clusters_applications_ingress ( + id integer NOT NULL, + cluster_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + ingress_type integer NOT NULL, + version character varying NOT NULL, + cluster_ip character varying, + status_reason text, + external_ip character varying, + external_hostname character varying +); + +CREATE SEQUENCE clusters_applications_ingress_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_ingress_id_seq OWNED BY clusters_applications_ingress.id; + +CREATE TABLE clusters_applications_jupyter ( + id integer NOT NULL, + cluster_id integer NOT NULL, + oauth_application_id integer, + status integer NOT NULL, + version character varying NOT NULL, + hostname character varying, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_jupyter_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_jupyter_id_seq OWNED BY clusters_applications_jupyter.id; + +CREATE TABLE clusters_applications_knative ( + id integer NOT NULL, + cluster_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + version character varying NOT NULL, + hostname character varying, + status_reason text, + external_ip character varying, + external_hostname character varying +); + +CREATE SEQUENCE clusters_applications_knative_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_knative_id_seq OWNED BY clusters_applications_knative.id; + +CREATE TABLE clusters_applications_prometheus ( + id integer NOT NULL, + cluster_id integer NOT NULL, + status integer NOT NULL, + version character varying NOT NULL, + status_reason text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + encrypted_alert_manager_token character varying, + encrypted_alert_manager_token_iv character varying, + last_update_started_at timestamp with time zone, + healthy boolean +); + +CREATE SEQUENCE clusters_applications_prometheus_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_prometheus_id_seq OWNED BY clusters_applications_prometheus.id; + +CREATE TABLE clusters_applications_runners ( + id integer NOT NULL, + cluster_id integer NOT NULL, + runner_id integer, + status integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + version character varying NOT NULL, + status_reason text, + privileged boolean DEFAULT true NOT NULL +); + +CREATE SEQUENCE clusters_applications_runners_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_runners_id_seq OWNED BY clusters_applications_runners.id; + +CREATE SEQUENCE clusters_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_id_seq OWNED BY clusters.id; + +CREATE TABLE clusters_integration_elasticstack ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + cluster_id bigint NOT NULL, + enabled boolean DEFAULT false NOT NULL, + chart_version text, + CONSTRAINT check_f8d671ce04 CHECK ((char_length(chart_version) <= 10)) +); + +CREATE TABLE clusters_integration_prometheus ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + cluster_id bigint NOT NULL, + enabled boolean DEFAULT false NOT NULL, + encrypted_alert_manager_token text, + encrypted_alert_manager_token_iv text, + health_status smallint DEFAULT 0 NOT NULL +); + +CREATE TABLE clusters_kubernetes_namespaces ( + id bigint NOT NULL, + cluster_id integer NOT NULL, + project_id integer, + cluster_project_id integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + encrypted_service_account_token_iv character varying, + namespace character varying NOT NULL, + service_account_name character varying, + encrypted_service_account_token text, + environment_id bigint +); + +CREATE SEQUENCE clusters_kubernetes_namespaces_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_kubernetes_namespaces_id_seq OWNED BY clusters_kubernetes_namespaces.id; + +CREATE TABLE commit_user_mentions ( + id bigint NOT NULL, + note_id integer NOT NULL, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[], + commit_id character varying, + CONSTRAINT check_724d773807 CHECK ((commit_id IS NOT NULL)) +); + +CREATE SEQUENCE commit_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE commit_user_mentions_id_seq OWNED BY commit_user_mentions.id; + +CREATE TABLE compliance_management_frameworks ( + id bigint NOT NULL, + name text NOT NULL, + description text NOT NULL, + color text NOT NULL, + namespace_id integer NOT NULL, + regulated boolean DEFAULT true NOT NULL, + pipeline_configuration_full_path text, + CONSTRAINT check_08cd34b2c2 CHECK ((char_length(color) <= 10)), + CONSTRAINT check_1617e0b87e CHECK ((char_length(description) <= 255)), + CONSTRAINT check_ab00bc2193 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e7a9972435 CHECK ((char_length(pipeline_configuration_full_path) <= 255)) +); + +CREATE SEQUENCE compliance_management_frameworks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE compliance_management_frameworks_id_seq OWNED BY compliance_management_frameworks.id; + +CREATE TABLE container_expiration_policies ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + next_run_at timestamp with time zone, + project_id bigint NOT NULL, + name_regex character varying(255) DEFAULT '.*'::character varying, + cadence character varying(12) DEFAULT '1d'::character varying NOT NULL, + older_than character varying(12) DEFAULT '90d'::character varying, + keep_n integer DEFAULT 10, + enabled boolean DEFAULT false NOT NULL, + name_regex_keep text, + CONSTRAINT container_expiration_policies_name_regex_keep CHECK ((char_length(name_regex_keep) <= 255)) +); + +CREATE TABLE container_repositories ( + id integer NOT NULL, + project_id integer NOT NULL, + name character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + 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, + 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 + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + instance_issues double precision NOT NULL, + leader_notes double precision NOT NULL, + instance_notes double precision NOT NULL, + leader_milestones double precision NOT NULL, + instance_milestones double precision NOT NULL, + leader_boards double precision NOT NULL, + instance_boards double precision NOT NULL, + leader_merge_requests double precision NOT NULL, + instance_merge_requests double precision NOT NULL, + leader_ci_pipelines double precision NOT NULL, + instance_ci_pipelines double precision NOT NULL, + leader_environments double precision NOT NULL, + instance_environments double precision NOT NULL, + leader_deployments double precision NOT NULL, + instance_deployments double precision NOT NULL, + leader_projects_prometheus_active double precision NOT NULL, + instance_projects_prometheus_active double precision NOT NULL, + leader_service_desk_issues double precision NOT NULL, + instance_service_desk_issues double precision NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + percentage_boards double precision DEFAULT 0.0 NOT NULL, + percentage_ci_pipelines double precision DEFAULT 0.0 NOT NULL, + percentage_deployments double precision DEFAULT 0.0 NOT NULL, + percentage_environments double precision DEFAULT 0.0 NOT NULL, + percentage_issues double precision DEFAULT 0.0 NOT NULL, + percentage_merge_requests double precision DEFAULT 0.0 NOT NULL, + percentage_milestones double precision DEFAULT 0.0 NOT NULL, + percentage_notes double precision DEFAULT 0.0 NOT NULL, + percentage_projects_prometheus_active double precision DEFAULT 0.0 NOT NULL, + percentage_service_desk_issues double precision DEFAULT 0.0 NOT NULL +); + +CREATE SEQUENCE conversational_development_index_metrics_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + user_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE csv_issue_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE csv_issue_imports_id_seq OWNED BY csv_issue_imports.id; + +CREATE TABLE custom_emoji ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + file text NOT NULL, + external boolean DEFAULT true NOT NULL, + creator_id bigint NOT NULL, + CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)), + CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE custom_emoji_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE custom_emoji_id_seq OWNED BY custom_emoji.id; + +CREATE TABLE customer_relations_contacts ( + id bigint NOT NULL, + group_id bigint NOT NULL, + organization_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + state smallint DEFAULT 1 NOT NULL, + phone text, + first_name text NOT NULL, + last_name text NOT NULL, + email text, + description text, + CONSTRAINT check_1195f4c929 CHECK ((char_length(first_name) <= 255)), + CONSTRAINT check_40c70da037 CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_cd2d67c484 CHECK ((char_length(last_name) <= 255)), + CONSTRAINT check_f4b7f78c89 CHECK ((char_length(phone) <= 32)), + CONSTRAINT check_fc0adabf60 CHECK ((char_length(email) <= 255)) +); + +CREATE SEQUENCE customer_relations_contacts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE customer_relations_contacts_id_seq OWNED BY customer_relations_contacts.id; + +CREATE TABLE customer_relations_organizations ( + id bigint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + state smallint DEFAULT 1 NOT NULL, + default_rate numeric(18,2), + name text NOT NULL, + description text, + CONSTRAINT check_2ba9ef1c4c CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e476b6058e CHECK ((char_length(description) <= 1024)) +); + +CREATE SEQUENCE customer_relations_organizations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE customer_relations_organizations_id_seq OWNED BY customer_relations_organizations.id; + +CREATE TABLE dast_profile_schedules ( + id bigint NOT NULL, + project_id bigint NOT NULL, + dast_profile_id bigint NOT NULL, + user_id bigint, + next_run_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + active boolean DEFAULT true NOT NULL, + cron text NOT NULL, + cadence jsonb DEFAULT '{}'::jsonb NOT NULL, + timezone text NOT NULL, + starts_at timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT check_86531ea73f CHECK ((char_length(cron) <= 255)), + CONSTRAINT check_be4d1c3af1 CHECK ((char_length(timezone) <= 255)) +); + +COMMENT ON TABLE dast_profile_schedules IS '{"owner":"group::dynamic analysis","description":"Scheduling for scans using DAST Profiles"}'; + +CREATE SEQUENCE dast_profile_schedules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_profile_schedules_id_seq OWNED BY dast_profile_schedules.id; + +CREATE TABLE dast_profiles ( + id bigint NOT NULL, + project_id bigint NOT NULL, + dast_site_profile_id bigint NOT NULL, + dast_scanner_profile_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + description text NOT NULL, + branch_name text, + CONSTRAINT check_5fcf73bf61 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_6c9d775949 CHECK ((char_length(branch_name) <= 255)), + CONSTRAINT check_c34e505c24 CHECK ((char_length(description) <= 255)) +); + +COMMENT ON TABLE dast_profiles IS '{"owner":"group::dynamic analysis","description":"Profile used to run a DAST on-demand scan"}'; + +CREATE SEQUENCE dast_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_profiles_id_seq OWNED BY dast_profiles.id; + +CREATE TABLE dast_profiles_pipelines ( + dast_profile_id bigint NOT NULL, + ci_pipeline_id bigint NOT NULL +); + +COMMENT ON TABLE dast_profiles_pipelines IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Profiles and CI Pipelines"}'; + +CREATE TABLE dast_scanner_profiles ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + spider_timeout smallint, + target_timeout smallint, + name text NOT NULL, + scan_type smallint DEFAULT 1 NOT NULL, + use_ajax_spider boolean DEFAULT false NOT NULL, + show_debug_messages boolean DEFAULT false NOT NULL, + CONSTRAINT check_568568fabf CHECK ((char_length(name) <= 255)) +); + +CREATE TABLE dast_scanner_profiles_builds ( + dast_scanner_profile_id bigint NOT NULL, + ci_build_id bigint NOT NULL +); + +COMMENT ON TABLE dast_scanner_profiles_builds IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Scanner Profiles and CI Builds"}'; + +CREATE SEQUENCE dast_scanner_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_scanner_profiles_id_seq OWNED BY dast_scanner_profiles.id; + +CREATE TABLE dast_site_profile_secret_variables ( + id bigint NOT NULL, + dast_site_profile_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL, + key text NOT NULL, + encrypted_value bytea NOT NULL, + encrypted_value_iv bytea NOT NULL, + CONSTRAINT check_236213f179 CHECK ((length(encrypted_value) <= 13352)), + CONSTRAINT check_8cbef204b2 CHECK ((char_length(key) <= 255)), + CONSTRAINT check_b49080abbf CHECK ((length(encrypted_value_iv) <= 17)) +); + +COMMENT ON TABLE dast_site_profile_secret_variables IS '{"owner":"group::dynamic analysis","description":"Secret variables used in DAST on-demand scans"}'; + +CREATE SEQUENCE dast_site_profile_secret_variables_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_profile_secret_variables_id_seq OWNED BY dast_site_profile_secret_variables.id; + +CREATE TABLE dast_site_profiles ( + id bigint NOT NULL, + project_id bigint NOT NULL, + dast_site_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + excluded_urls text[] DEFAULT '{}'::text[] NOT NULL, + auth_enabled boolean DEFAULT false NOT NULL, + auth_url text, + auth_username_field text, + 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)), + CONSTRAINT check_d446f7047b CHECK ((char_length(auth_url) <= 1024)), + CONSTRAINT check_f22f18002a CHECK ((char_length(auth_username) <= 255)) +); + +CREATE TABLE dast_site_profiles_builds ( + dast_site_profile_id bigint NOT NULL, + ci_build_id bigint NOT NULL +); + +COMMENT ON TABLE dast_site_profiles_builds IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Site Profiles and CI Builds"}'; + +CREATE SEQUENCE dast_site_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_profiles_id_seq OWNED BY dast_site_profiles.id; + +CREATE TABLE dast_site_profiles_pipelines ( + dast_site_profile_id bigint NOT NULL, + ci_pipeline_id bigint NOT NULL +); + +COMMENT ON TABLE dast_site_profiles_pipelines IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Site Profiles and CI Pipelines"}'; + +CREATE TABLE dast_site_tokens ( + 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, + expired_at timestamp with time zone, + token text NOT NULL, + url text NOT NULL, + CONSTRAINT check_02a6bf20a7 CHECK ((char_length(token) <= 255)), + CONSTRAINT check_69ab8622a6 CHECK ((char_length(url) <= 255)) +); + +CREATE SEQUENCE dast_site_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_tokens_id_seq OWNED BY dast_site_tokens.id; + +CREATE TABLE dast_site_validations ( + id bigint NOT NULL, + dast_site_token_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + validation_started_at timestamp with time zone, + validation_passed_at timestamp with time zone, + validation_failed_at timestamp with time zone, + validation_last_retried_at timestamp with time zone, + validation_strategy smallint NOT NULL, + url_base text NOT NULL, + url_path text NOT NULL, + state text DEFAULT 'pending'::text NOT NULL, + CONSTRAINT check_13b34efe4b CHECK ((char_length(url_path) <= 255)), + CONSTRAINT check_283be72e9b CHECK ((char_length(state) <= 255)), + CONSTRAINT check_cd3b538210 CHECK ((char_length(url_base) <= 255)) +); + +CREATE SEQUENCE dast_site_validations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_validations_id_seq OWNED BY dast_site_validations.id; + +CREATE TABLE dast_sites ( + 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, + url text NOT NULL, + dast_site_validation_id bigint, + CONSTRAINT check_46df8b449c CHECK ((char_length(url) <= 255)) +); + +CREATE SEQUENCE dast_sites_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id; + +CREATE TABLE dependency_proxy_blobs ( + id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + file text NOT NULL, + file_name character varying NOT NULL, + file_store integer, + group_id integer NOT NULL, + size bigint, + 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 + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dependency_proxy_blobs_id_seq OWNED BY dependency_proxy_blobs.id; + +CREATE TABLE dependency_proxy_group_settings ( + id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + enabled boolean DEFAULT false NOT NULL, + group_id integer NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE dependency_proxy_group_settings_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dependency_proxy_group_settings_id_seq OWNED BY dependency_proxy_group_settings.id; + +CREATE TABLE dependency_proxy_image_ttl_group_policies ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + ttl integer DEFAULT 90, + enabled boolean DEFAULT false NOT NULL +); + +CREATE TABLE dependency_proxy_manifests ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + size bigint, + file_store smallint, + file_name text NOT NULL, + 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)), + CONSTRAINT check_f5d9996bf1 CHECK ((char_length(digest) <= 255)) +); + +CREATE SEQUENCE dependency_proxy_manifests_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dependency_proxy_manifests_id_seq OWNED BY dependency_proxy_manifests.id; + +CREATE TABLE deploy_keys_projects ( + id integer NOT NULL, + deploy_key_id integer NOT NULL, + project_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + can_push boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE deploy_keys_projects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE deploy_keys_projects_id_seq OWNED BY deploy_keys_projects.id; + +CREATE TABLE deploy_tokens ( + id integer NOT NULL, + revoked boolean DEFAULT false, + read_repository boolean DEFAULT false NOT NULL, + read_registry boolean DEFAULT false NOT NULL, + expires_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, + name character varying NOT NULL, + token character varying, + username character varying, + token_encrypted character varying(255), + deploy_token_type smallint DEFAULT 2 NOT NULL, + write_registry boolean DEFAULT false NOT NULL, + read_package_registry boolean DEFAULT false NOT NULL, + write_package_registry boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE deploy_tokens_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + kubernetes_namespace character varying(255) +); + +CREATE TABLE deployment_merge_requests ( + deployment_id integer NOT NULL, + merge_request_id integer NOT NULL, + environment_id integer +); + +CREATE TABLE deployments ( + id integer NOT NULL, + iid integer NOT NULL, + project_id integer NOT NULL, + environment_id integer NOT NULL, + ref character varying NOT NULL, + tag boolean NOT NULL, + sha character varying NOT NULL, + user_id integer, + deployable_type character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + on_stop character varying, + finished_at timestamp with time zone, + status smallint NOT NULL, + cluster_id integer, + deployable_id bigint, + archived boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE deployments_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE deployments_id_seq OWNED BY deployments.id; + +CREATE TABLE description_versions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + issue_id integer, + merge_request_id integer, + epic_id integer, + description text, + deleted_at timestamp with time zone +); + +CREATE SEQUENCE description_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE description_versions_id_seq OWNED BY description_versions.id; + +CREATE TABLE design_management_designs ( + id bigint NOT NULL, + project_id integer NOT NULL, + issue_id integer, + filename character varying NOT NULL, + relative_position integer, + iid integer, + CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255)), + CONSTRAINT check_cfb92df01a CHECK ((iid IS NOT NULL)) +); + +CREATE SEQUENCE design_management_designs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE design_management_designs_id_seq OWNED BY design_management_designs.id; + +CREATE TABLE design_management_designs_versions ( + design_id bigint NOT NULL, + version_id bigint NOT NULL, + event smallint DEFAULT 0 NOT NULL, + image_v432x230 character varying(255), + id bigint NOT NULL +); + +CREATE SEQUENCE design_management_designs_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE design_management_designs_versions_id_seq OWNED BY design_management_designs_versions.id; + +CREATE TABLE design_management_versions ( + id bigint NOT NULL, + sha bytea NOT NULL, + issue_id bigint, + created_at timestamp with time zone NOT NULL, + author_id integer +); + +CREATE SEQUENCE design_management_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE design_management_versions_id_seq OWNED BY design_management_versions.id; + +CREATE TABLE design_user_mentions ( + id bigint NOT NULL, + design_id integer NOT NULL, + note_id integer NOT NULL, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE design_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE design_user_mentions_id_seq OWNED BY design_user_mentions.id; + +CREATE TABLE detached_partitions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + drop_after timestamp with time zone NOT NULL, + table_name text NOT NULL, + CONSTRAINT check_aecee24ba3 CHECK ((char_length(table_name) <= 63)) +); + +CREATE SEQUENCE detached_partitions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE detached_partitions_id_seq OWNED BY detached_partitions.id; + +CREATE TABLE diff_note_positions ( + id bigint NOT NULL, + note_id bigint NOT NULL, + old_line integer, + new_line integer, + diff_content_type smallint NOT NULL, + diff_type smallint NOT NULL, + line_code character varying(255) NOT NULL, + base_sha bytea NOT NULL, + start_sha bytea NOT NULL, + head_sha bytea NOT NULL, + old_path text NOT NULL, + new_path text NOT NULL +); + +CREATE SEQUENCE diff_note_positions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE diff_note_positions_id_seq OWNED BY diff_note_positions.id; + +CREATE TABLE dora_daily_metrics ( + id bigint NOT NULL, + environment_id bigint NOT NULL, + 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)) +); + +CREATE SEQUENCE dora_daily_metrics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dora_daily_metrics_id_seq OWNED BY dora_daily_metrics.id; + +CREATE TABLE draft_notes ( + id bigint NOT NULL, + merge_request_id integer NOT NULL, + author_id integer NOT NULL, + resolve_discussion boolean DEFAULT false NOT NULL, + discussion_id character varying, + note text NOT NULL, + "position" text, + original_position text, + change_position text, + commit_id bytea, + line_code text, + CONSTRAINT check_c497a94a0e CHECK ((char_length(line_code) <= 255)) +); + +CREATE SEQUENCE draft_notes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE draft_notes_id_seq OWNED BY draft_notes.id; + +CREATE TABLE elastic_index_settings ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + number_of_replicas smallint DEFAULT 1 NOT NULL, + number_of_shards smallint DEFAULT 5 NOT NULL, + alias_name text NOT NULL, + CONSTRAINT check_c30005c325 CHECK ((char_length(alias_name) <= 255)) +); + +CREATE SEQUENCE elastic_index_settings_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE elastic_index_settings_id_seq OWNED BY elastic_index_settings.id; + +CREATE TABLE elastic_reindexing_slices ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + elastic_reindexing_subtask_id bigint NOT NULL, + elastic_slice smallint DEFAULT 0 NOT NULL, + elastic_max_slice smallint DEFAULT 0 NOT NULL, + retry_attempt smallint DEFAULT 0 NOT NULL, + elastic_task text, + CONSTRAINT check_ca30e1396e CHECK ((char_length(elastic_task) <= 255)) +); + +CREATE SEQUENCE elastic_reindexing_slices_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE elastic_reindexing_slices_id_seq OWNED BY elastic_reindexing_slices.id; + +CREATE TABLE elastic_reindexing_subtasks ( + id bigint NOT NULL, + elastic_reindexing_task_id bigint NOT NULL, + alias_name text NOT NULL, + index_name_from text NOT NULL, + index_name_to text NOT NULL, + elastic_task text, + documents_count_target integer, + documents_count integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_4910adc798 CHECK ((char_length(elastic_task) <= 255)), + CONSTRAINT check_88f56216a4 CHECK ((char_length(alias_name) <= 255)), + CONSTRAINT check_a1fbd9faa9 CHECK ((char_length(index_name_from) <= 255)), + CONSTRAINT check_f456494bd8 CHECK ((char_length(index_name_to) <= 255)) +); + +CREATE SEQUENCE elastic_reindexing_subtasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE elastic_reindexing_subtasks_id_seq OWNED BY elastic_reindexing_subtasks.id; + +CREATE TABLE elastic_reindexing_tasks ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + state smallint DEFAULT 0 NOT NULL, + in_progress boolean DEFAULT true NOT NULL, + error_message text, + delete_original_index_at timestamp with time zone, + max_slices_running smallint DEFAULT 60 NOT NULL, + slice_multiplier smallint DEFAULT 2 NOT NULL, + CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255)) +); + +CREATE SEQUENCE elastic_reindexing_tasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE elastic_reindexing_tasks_id_seq OWNED BY elastic_reindexing_tasks.id; + +CREATE TABLE elasticsearch_indexed_namespaces ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id integer NOT NULL +); + +CREATE TABLE elasticsearch_indexed_projects ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL +); + +CREATE TABLE emails ( + id integer NOT NULL, + user_id integer NOT NULL, + email character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + confirmation_token character varying, + confirmed_at timestamp with time zone, + confirmation_sent_at timestamp with time zone +); + +CREATE SEQUENCE emails_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE emails_id_seq OWNED BY emails.id; + +CREATE TABLE environments ( + id integer NOT NULL, + project_id integer NOT NULL, + name character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + external_url character varying, + environment_type character varying, + state character varying DEFAULT 'available'::character varying NOT NULL, + slug character varying NOT NULL, + auto_stop_at timestamp with time zone, + auto_delete_at timestamp with time zone, + tier smallint +); + +CREATE SEQUENCE environments_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE environments_id_seq OWNED BY environments.id; + +CREATE TABLE epic_issues ( + id integer NOT NULL, + epic_id integer NOT NULL, + issue_id integer NOT NULL, + relative_position integer +); + +CREATE SEQUENCE epic_issues_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE epic_issues_id_seq OWNED BY epic_issues.id; + +CREATE TABLE epic_metrics ( + id integer NOT NULL, + epic_id integer NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE epic_metrics_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE epic_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE epic_user_mentions_id_seq OWNED BY epic_user_mentions.id; + +CREATE TABLE epics ( + id integer NOT NULL, + group_id integer NOT NULL, + author_id integer NOT NULL, + assignee_id integer, + iid integer NOT NULL, + cached_markdown_version integer, + updated_by_id integer, + last_edited_by_id integer, + lock_version integer DEFAULT 0, + start_date date, + end_date date, + last_edited_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + title character varying NOT NULL, + title_html character varying NOT NULL, + description text, + description_html text, + start_date_sourcing_milestone_id integer, + due_date_sourcing_milestone_id integer, + start_date_fixed date, + due_date_fixed date, + start_date_is_fixed boolean, + due_date_is_fixed boolean, + closed_by_id integer, + closed_at timestamp without time zone, + parent_id integer, + relative_position integer, + start_date_sourcing_epic_id integer, + due_date_sourcing_epic_id integer, + state_id smallint DEFAULT 1, + external_key character varying(255), + confidential boolean DEFAULT false NOT NULL, + 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 + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE epics_id_seq OWNED BY epics.id; + +CREATE TABLE error_tracking_client_keys ( + id bigint NOT NULL, + project_id bigint NOT NULL, + active boolean DEFAULT true NOT NULL, + public_key text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_840b719790 CHECK ((char_length(public_key) <= 255)) +); + +CREATE SEQUENCE error_tracking_client_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE error_tracking_client_keys_id_seq OWNED BY error_tracking_client_keys.id; + +CREATE TABLE error_tracking_error_events ( + id bigint NOT NULL, + error_id bigint NOT NULL, + description text NOT NULL, + environment text, + level text, + occurred_at timestamp with time zone NOT NULL, + payload jsonb DEFAULT '{}'::jsonb NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_92ecc3077b CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_c67d5b8007 CHECK ((char_length(level) <= 255)), + CONSTRAINT check_f4b52474ad CHECK ((char_length(environment) <= 255)) +); + +CREATE SEQUENCE error_tracking_error_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE error_tracking_error_events_id_seq OWNED BY error_tracking_error_events.id; + +CREATE TABLE error_tracking_errors ( + id bigint NOT NULL, + project_id bigint NOT NULL, + name text NOT NULL, + description text NOT NULL, + actor text NOT NULL, + first_seen_at timestamp with time zone DEFAULT now() NOT NULL, + last_seen_at timestamp with time zone DEFAULT now() NOT NULL, + platform text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + events_count bigint DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_18a758e537 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_b5cb4d3888 CHECK ((char_length(actor) <= 255)), + CONSTRAINT check_c739788b12 CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_fe99886883 CHECK ((char_length(platform) <= 255)) +); + +CREATE SEQUENCE error_tracking_errors_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE error_tracking_errors_id_seq OWNED BY error_tracking_errors.id; + +CREATE TABLE events ( + project_id integer, + author_id integer NOT NULL, + target_id integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + action smallint NOT NULL, + target_type character varying, + group_id bigint, + fingerprint bytea, + id bigint NOT NULL, + CONSTRAINT check_97e06e05ad CHECK ((octet_length(fingerprint) <= 128)) +); + +CREATE SEQUENCE events_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE events_id_seq OWNED BY events.id; + +CREATE TABLE evidences ( + id bigint NOT NULL, + release_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + summary_sha bytea, + summary jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE evidences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE evidences_id_seq OWNED BY evidences.id; + +CREATE TABLE experiment_subjects ( + id bigint NOT NULL, + experiment_id bigint NOT NULL, + user_id bigint, + project_id bigint, + variant smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + converted_at timestamp with time zone, + context jsonb DEFAULT '{}'::jsonb NOT NULL, + namespace_id bigint, + CONSTRAINT check_f6411bc4b5 CHECK ((num_nonnulls(user_id, namespace_id, project_id) = 1)) +); + +CREATE SEQUENCE experiment_subjects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id; + +CREATE TABLE experiment_users ( + id bigint NOT NULL, + experiment_id bigint NOT NULL, + user_id bigint NOT NULL, + group_type smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + converted_at timestamp with time zone, + context jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE experiment_users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiment_users_id_seq OWNED BY experiment_users.id; + +CREATE TABLE experiments ( + id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_e2dda25ed0 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE experiments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiments_id_seq OWNED BY experiments.id; + +CREATE TABLE external_approval_rules ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + external_url text NOT NULL, + name text NOT NULL, + CONSTRAINT check_1c64b53ea5 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_b634ca168d CHECK ((char_length(external_url) <= 255)) +); + +CREATE SEQUENCE external_approval_rules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE external_approval_rules_id_seq OWNED BY external_approval_rules.id; + +CREATE TABLE external_approval_rules_protected_branches ( + id bigint NOT NULL, + external_approval_rule_id bigint NOT NULL, + protected_branch_id bigint NOT NULL +); + +CREATE SEQUENCE external_approval_rules_protected_branches_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE external_approval_rules_protected_branches_id_seq OWNED BY external_approval_rules_protected_branches.id; + +CREATE TABLE external_pull_requests ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + pull_request_iid integer NOT NULL, + status smallint NOT NULL, + source_branch character varying(255) NOT NULL, + target_branch character varying(255) NOT NULL, + source_repository character varying(255) NOT NULL, + target_repository character varying(255) NOT NULL, + source_sha bytea NOT NULL, + target_sha bytea NOT NULL +); + +CREATE SEQUENCE external_pull_requests_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE external_pull_requests_id_seq OWNED BY external_pull_requests.id; + +CREATE TABLE external_status_checks ( + 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, + external_url text NOT NULL, + name text NOT NULL, + CONSTRAINT check_7e3b9eb41a CHECK ((char_length(name) <= 255)), + CONSTRAINT check_ae0dec3f61 CHECK ((char_length(external_url) <= 255)) +); + +CREATE SEQUENCE external_status_checks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE external_status_checks_id_seq OWNED BY external_status_checks.id; + +CREATE TABLE external_status_checks_protected_branches ( + id bigint NOT NULL, + external_status_check_id bigint NOT NULL, + protected_branch_id bigint NOT NULL +); + +CREATE SEQUENCE external_status_checks_protected_branches_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE external_status_checks_protected_branches_id_seq OWNED BY external_status_checks_protected_branches.id; + +CREATE TABLE feature_gates ( + id integer NOT NULL, + feature_key character varying NOT NULL, + key character varying NOT NULL, + value character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE feature_gates_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE feature_gates_id_seq OWNED BY feature_gates.id; + +CREATE TABLE features ( + id integer NOT NULL, + key character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE features_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE features_id_seq OWNED BY features.id; + +CREATE TABLE fork_network_members ( + id integer NOT NULL, + fork_network_id integer NOT NULL, + project_id integer NOT NULL, + forked_from_project_id integer +); + +CREATE SEQUENCE fork_network_members_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE fork_network_members_id_seq OWNED BY fork_network_members.id; + +CREATE TABLE fork_networks ( + id integer NOT NULL, + root_project_id integer, + deleted_root_project_name character varying +); + +CREATE SEQUENCE fork_networks_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE fork_networks_id_seq OWNED BY fork_networks.id; + +CREATE TABLE geo_cache_invalidation_events ( + id bigint NOT NULL, + key character varying NOT NULL +); + +CREATE SEQUENCE geo_cache_invalidation_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_cache_invalidation_events_id_seq OWNED BY geo_cache_invalidation_events.id; + +CREATE TABLE geo_container_repository_updated_events ( + id bigint NOT NULL, + container_repository_id integer NOT NULL +); + +CREATE SEQUENCE geo_container_repository_updated_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_container_repository_updated_events_id_seq OWNED BY geo_container_repository_updated_events.id; + +CREATE TABLE geo_event_log ( + id bigint NOT NULL, + created_at timestamp without time zone NOT NULL, + repository_updated_event_id bigint, + repository_deleted_event_id bigint, + repository_renamed_event_id bigint, + repositories_changed_event_id bigint, + repository_created_event_id bigint, + hashed_storage_migrated_event_id bigint, + lfs_object_deleted_event_id bigint, + hashed_storage_attachments_event_id bigint, + job_artifact_deleted_event_id bigint, + reset_checksum_event_id bigint, + cache_invalidation_event_id bigint, + container_repository_updated_event_id bigint, + geo_event_id integer +); + +CREATE SEQUENCE geo_event_log_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_event_log_id_seq OWNED BY geo_event_log.id; + +CREATE TABLE geo_events ( + id bigint NOT NULL, + replicable_name character varying(255) NOT NULL, + event_name character varying(255) NOT NULL, + payload jsonb DEFAULT '{}'::jsonb NOT NULL, + created_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE geo_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_events_id_seq OWNED BY geo_events.id; + +CREATE TABLE geo_hashed_storage_attachments_events ( + id bigint NOT NULL, + project_id integer NOT NULL, + old_attachments_path text NOT NULL, + new_attachments_path text NOT NULL +); + +CREATE SEQUENCE geo_hashed_storage_attachments_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_hashed_storage_attachments_events_id_seq OWNED BY geo_hashed_storage_attachments_events.id; + +CREATE TABLE geo_hashed_storage_migrated_events ( + id bigint NOT NULL, + project_id integer NOT NULL, + repository_storage_name text NOT NULL, + old_disk_path text NOT NULL, + new_disk_path text NOT NULL, + old_wiki_disk_path text NOT NULL, + new_wiki_disk_path text NOT NULL, + old_storage_version smallint, + new_storage_version smallint NOT NULL, + old_design_disk_path text, + new_design_disk_path text +); + +CREATE SEQUENCE geo_hashed_storage_migrated_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_hashed_storage_migrated_events_id_seq OWNED BY geo_hashed_storage_migrated_events.id; + +CREATE TABLE geo_job_artifact_deleted_events ( + id bigint NOT NULL, + file_path character varying NOT NULL, + job_artifact_id bigint NOT NULL +); + +CREATE SEQUENCE geo_job_artifact_deleted_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_job_artifact_deleted_events_id_seq OWNED BY geo_job_artifact_deleted_events.id; + +CREATE TABLE geo_lfs_object_deleted_events ( + id bigint NOT NULL, + lfs_object_id integer NOT NULL, + oid character varying NOT NULL, + file_path character varying NOT NULL +); + +CREATE SEQUENCE geo_lfs_object_deleted_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_lfs_object_deleted_events_id_seq OWNED BY geo_lfs_object_deleted_events.id; + +CREATE TABLE geo_node_namespace_links ( + id integer NOT NULL, + geo_node_id integer NOT NULL, + namespace_id integer NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE geo_node_namespace_links_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_node_namespace_links_id_seq OWNED BY geo_node_namespace_links.id; + +CREATE TABLE geo_node_statuses ( + id integer NOT NULL, + geo_node_id integer NOT NULL, + db_replication_lag_seconds integer, + repositories_synced_count integer, + repositories_failed_count integer, + lfs_objects_count integer, + lfs_objects_synced_count integer, + lfs_objects_failed_count integer, + last_event_id integer, + last_event_date timestamp without time zone, + cursor_last_event_id integer, + cursor_last_event_date timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + last_successful_status_check_at timestamp without time zone, + status_message character varying, + replication_slots_count integer, + replication_slots_used_count integer, + replication_slots_max_retained_wal_bytes bigint, + wikis_synced_count integer, + wikis_failed_count integer, + job_artifacts_count integer, + job_artifacts_synced_count integer, + job_artifacts_failed_count integer, + version character varying, + revision character varying, + repositories_verified_count integer, + repositories_verification_failed_count integer, + wikis_verified_count integer, + wikis_verification_failed_count integer, + lfs_objects_synced_missing_on_primary_count integer, + job_artifacts_synced_missing_on_primary_count integer, + repositories_checksummed_count integer, + repositories_checksum_failed_count integer, + repositories_checksum_mismatch_count integer, + wikis_checksummed_count integer, + wikis_checksum_failed_count integer, + wikis_checksum_mismatch_count integer, + storage_configuration_digest bytea, + repositories_retrying_verification_count integer, + wikis_retrying_verification_count integer, + projects_count integer, + container_repositories_count integer, + container_repositories_synced_count integer, + container_repositories_failed_count integer, + container_repositories_registry_count integer, + design_repositories_count integer, + design_repositories_synced_count integer, + design_repositories_failed_count integer, + design_repositories_registry_count integer, + status jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE geo_node_statuses_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_node_statuses_id_seq OWNED BY geo_node_statuses.id; + +CREATE TABLE geo_nodes ( + id integer NOT NULL, + "primary" boolean DEFAULT false NOT NULL, + oauth_application_id integer, + enabled boolean DEFAULT true NOT NULL, + access_key character varying, + encrypted_secret_access_key character varying, + encrypted_secret_access_key_iv character varying, + clone_url_prefix character varying, + files_max_capacity integer DEFAULT 10 NOT NULL, + repos_max_capacity integer DEFAULT 25 NOT NULL, + url character varying NOT NULL, + selective_sync_type character varying, + selective_sync_shards text, + verification_max_capacity integer DEFAULT 100 NOT NULL, + minimum_reverification_interval integer DEFAULT 7 NOT NULL, + internal_url character varying, + name character varying NOT NULL, + container_repositories_max_capacity integer DEFAULT 10 NOT NULL, + sync_object_storage boolean DEFAULT false NOT NULL, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + +CREATE SEQUENCE geo_nodes_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_nodes_id_seq OWNED BY geo_nodes.id; + +CREATE TABLE geo_repositories_changed_events ( + id bigint NOT NULL, + geo_node_id integer NOT NULL +); + +CREATE SEQUENCE geo_repositories_changed_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_repositories_changed_events_id_seq OWNED BY geo_repositories_changed_events.id; + +CREATE TABLE geo_repository_created_events ( + id bigint NOT NULL, + project_id integer NOT NULL, + repository_storage_name text NOT NULL, + repo_path text NOT NULL, + wiki_path text, + project_name text NOT NULL +); + +CREATE SEQUENCE geo_repository_created_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_repository_created_events_id_seq OWNED BY geo_repository_created_events.id; + +CREATE TABLE geo_repository_deleted_events ( + id bigint NOT NULL, + project_id integer NOT NULL, + repository_storage_name text NOT NULL, + deleted_path text NOT NULL, + deleted_wiki_path text, + deleted_project_name text NOT NULL +); + +CREATE SEQUENCE geo_repository_deleted_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_repository_deleted_events_id_seq OWNED BY geo_repository_deleted_events.id; + +CREATE TABLE geo_repository_renamed_events ( + id bigint NOT NULL, + project_id integer NOT NULL, + repository_storage_name text NOT NULL, + old_path_with_namespace text NOT NULL, + new_path_with_namespace text NOT NULL, + old_wiki_path_with_namespace text NOT NULL, + new_wiki_path_with_namespace text NOT NULL, + old_path text NOT NULL, + new_path text NOT NULL +); + +CREATE SEQUENCE geo_repository_renamed_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_repository_renamed_events_id_seq OWNED BY geo_repository_renamed_events.id; + +CREATE TABLE geo_repository_updated_events ( + id bigint NOT NULL, + branches_affected integer NOT NULL, + tags_affected integer NOT NULL, + project_id integer NOT NULL, + source smallint NOT NULL, + new_branch boolean DEFAULT false NOT NULL, + remove_branch boolean DEFAULT false NOT NULL, + ref text +); + +CREATE SEQUENCE geo_repository_updated_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_repository_updated_events_id_seq OWNED BY geo_repository_updated_events.id; + +CREATE TABLE geo_reset_checksum_events ( + id bigint NOT NULL, + project_id integer NOT NULL +); + +CREATE SEQUENCE geo_reset_checksum_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_reset_checksum_events_id_seq OWNED BY geo_reset_checksum_events.id; + +CREATE TABLE gitlab_subscription_histories ( + id bigint NOT NULL, + gitlab_subscription_created_at timestamp with time zone, + gitlab_subscription_updated_at timestamp with time zone, + start_date date, + end_date date, + trial_ends_on date, + namespace_id integer, + hosted_plan_id integer, + max_seats_used integer, + seats integer, + trial boolean, + change_type smallint, + gitlab_subscription_id bigint NOT NULL, + created_at timestamp with time zone, + trial_starts_on date, + auto_renew boolean, + trial_extension_type smallint +); + +CREATE SEQUENCE gitlab_subscription_histories_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE gitlab_subscription_histories_id_seq OWNED BY gitlab_subscription_histories.id; + +CREATE TABLE gitlab_subscriptions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + start_date date, + end_date date, + trial_ends_on date, + namespace_id integer, + hosted_plan_id integer, + max_seats_used integer DEFAULT 0, + seats integer DEFAULT 0, + trial boolean DEFAULT false, + trial_starts_on date, + auto_renew boolean, + seats_in_use integer DEFAULT 0 NOT NULL, + seats_owed integer DEFAULT 0 NOT NULL, + trial_extension_type smallint, + CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL)) +); + +CREATE SEQUENCE gitlab_subscriptions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE gitlab_subscriptions_id_seq OWNED BY gitlab_subscriptions.id; + +CREATE TABLE gpg_key_subkeys ( + id integer NOT NULL, + gpg_key_id integer NOT NULL, + keyid bytea, + fingerprint bytea +); + +CREATE SEQUENCE gpg_key_subkeys_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE gpg_key_subkeys_id_seq OWNED BY gpg_key_subkeys.id; + +CREATE TABLE gpg_keys ( + id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id integer, + primary_keyid bytea, + fingerprint bytea, + key text +); + +CREATE SEQUENCE gpg_keys_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE gpg_keys_id_seq OWNED BY gpg_keys.id; + +CREATE TABLE gpg_signatures ( + id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer, + gpg_key_id integer, + commit_sha bytea, + gpg_key_primary_keyid bytea, + gpg_key_user_name text, + gpg_key_user_email text, + verification_status smallint DEFAULT 0 NOT NULL, + gpg_key_subkey_id integer +); + +CREATE SEQUENCE gpg_signatures_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE gpg_signatures_id_seq OWNED BY gpg_signatures.id; + +CREATE TABLE grafana_integrations ( + 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, + encrypted_token character varying(255) NOT NULL, + encrypted_token_iv character varying(255) NOT NULL, + grafana_url character varying(1024) NOT NULL, + enabled boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE grafana_integrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + updated_at timestamp with time zone NOT NULL, + group_id integer NOT NULL, + key character varying NOT NULL, + value character varying NOT NULL +); + +CREATE SEQUENCE group_custom_attributes_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_custom_attributes_id_seq OWNED BY group_custom_attributes.id; + +CREATE TABLE group_deletion_schedules ( + group_id bigint NOT NULL, + user_id bigint NOT NULL, + marked_for_deletion_on date NOT NULL +); + +CREATE TABLE group_deploy_keys ( + id bigint NOT NULL, + user_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + last_used_at timestamp with time zone, + expires_at timestamp with time zone, + key text NOT NULL, + title text, + fingerprint text NOT NULL, + fingerprint_sha256 bytea, + CONSTRAINT check_cc0365908d CHECK ((char_length(title) <= 255)), + CONSTRAINT check_e4526dcf91 CHECK ((char_length(fingerprint) <= 255)), + CONSTRAINT check_f58fa0a0f7 CHECK ((char_length(key) <= 4096)) +); + +CREATE TABLE group_deploy_keys_groups ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + group_deploy_key_id bigint NOT NULL, + can_push boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE group_deploy_keys_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_deploy_keys_groups_id_seq OWNED BY group_deploy_keys_groups.id; + +CREATE SEQUENCE group_deploy_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_deploy_keys_id_seq OWNED BY group_deploy_keys.id; + +CREATE TABLE group_deploy_tokens ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + deploy_token_id bigint NOT NULL +); + +CREATE SEQUENCE group_deploy_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + updated_at timestamp with time zone NOT NULL, + shared_group_id bigint NOT NULL, + shared_with_group_id bigint NOT NULL, + expires_at date, + group_access smallint DEFAULT 30 NOT NULL +); + +CREATE SEQUENCE group_group_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_group_links_id_seq OWNED BY group_group_links.id; + +CREATE TABLE group_import_states ( + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + jid text, + last_error text, + user_id bigint, + CONSTRAINT check_87b58f6b30 CHECK ((char_length(last_error) <= 255)), + CONSTRAINT check_96558fff96 CHECK ((char_length(jid) <= 100)) +); + +CREATE SEQUENCE group_import_states_group_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_import_states_group_id_seq OWNED BY group_import_states.group_id; + +CREATE TABLE group_merge_request_approval_settings ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + allow_author_approval boolean DEFAULT false NOT NULL, + allow_committer_approval boolean DEFAULT false NOT NULL, + allow_overrides_to_approver_list_per_merge_request boolean DEFAULT false NOT NULL, + retain_approvals_on_push boolean DEFAULT false NOT NULL, + require_password_to_approve boolean DEFAULT false NOT NULL +); + +CREATE TABLE group_repository_storage_moves ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + state smallint DEFAULT 1 NOT NULL, + source_storage_name text NOT NULL, + destination_storage_name text NOT NULL, + CONSTRAINT group_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), + CONSTRAINT group_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) +); + +CREATE SEQUENCE group_repository_storage_moves_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_repository_storage_moves_id_seq OWNED BY group_repository_storage_moves.id; + +CREATE TABLE group_wiki_repositories ( + shard_id bigint NOT NULL, + group_id bigint NOT NULL, + disk_path text NOT NULL, + CONSTRAINT check_07f1c81806 CHECK ((char_length(disk_path) <= 80)) +); + +CREATE TABLE historical_data ( + id integer NOT NULL, + date date, + active_user_count integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + recorded_at timestamp with time zone, + CONSTRAINT check_640e8cf66c CHECK ((recorded_at IS NOT NULL)) +); + +CREATE SEQUENCE historical_data_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE historical_data_id_seq OWNED BY historical_data.id; + +CREATE TABLE identities ( + id integer NOT NULL, + extern_uid character varying, + provider character varying, + user_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + saml_provider_id integer, + secondary_extern_uid character varying +); + +CREATE SEQUENCE identities_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE identities_id_seq OWNED BY identities.id; + +CREATE TABLE import_export_uploads ( + id integer NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer, + import_file text, + export_file text, + group_id bigint, + remote_import_url text, + CONSTRAINT check_58f0d37481 CHECK ((char_length(remote_import_url) <= 512)) +); + +CREATE SEQUENCE import_export_uploads_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE import_export_uploads_id_seq OWNED BY import_export_uploads.id; + +CREATE TABLE import_failures ( + id bigint NOT NULL, + relation_index integer, + project_id bigint, + created_at timestamp with time zone NOT NULL, + relation_key character varying(64), + exception_class character varying(128), + correlation_id_value character varying(128), + exception_message character varying(255), + retry_count integer, + group_id integer, + source character varying(128) +); + +CREATE SEQUENCE import_failures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE import_failures_id_seq OWNED BY import_failures.id; + +CREATE TABLE in_product_marketing_emails ( + id bigint NOT NULL, + user_id bigint NOT NULL, + cta_clicked_at timestamp with time zone, + track smallint NOT NULL, + series smallint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE in_product_marketing_emails_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE in_product_marketing_emails_id_seq OWNED BY in_product_marketing_emails.id; + +CREATE TABLE incident_management_escalation_policies ( + id bigint NOT NULL, + project_id bigint NOT NULL, + name text NOT NULL, + description text, + CONSTRAINT check_510b2a5258 CHECK ((char_length(description) <= 160)), + CONSTRAINT check_9a26365850 CHECK ((char_length(name) <= 72)) +); + +CREATE SEQUENCE incident_management_escalation_policies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_escalation_policies_id_seq OWNED BY incident_management_escalation_policies.id; + +CREATE TABLE incident_management_escalation_rules ( + id bigint NOT NULL, + policy_id bigint NOT NULL, + oncall_schedule_id bigint, + status smallint NOT NULL, + elapsed_time_seconds integer NOT NULL, + is_removed boolean DEFAULT false NOT NULL, + user_id bigint, + CONSTRAINT escalation_rules_one_of_oncall_schedule_or_user CHECK ((num_nonnulls(oncall_schedule_id, user_id) = 1)) +); + +CREATE SEQUENCE incident_management_escalation_rules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_escalation_rules_id_seq OWNED BY incident_management_escalation_rules.id; + +CREATE TABLE incident_management_issuable_escalation_statuses ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + issue_id bigint NOT NULL, + policy_id bigint, + escalations_started_at timestamp with time zone, + resolved_at timestamp with time zone, + status smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE incident_management_issuable_escalation_statuses_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_issuable_escalation_statuses_id_seq OWNED BY incident_management_issuable_escalation_statuses.id; + +CREATE TABLE incident_management_oncall_participants ( + id bigint NOT NULL, + oncall_rotation_id bigint NOT NULL, + user_id bigint NOT NULL, + color_palette smallint NOT NULL, + color_weight smallint NOT NULL, + is_removed boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE incident_management_oncall_participants_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_participants_id_seq OWNED BY incident_management_oncall_participants.id; + +CREATE TABLE incident_management_oncall_rotations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + oncall_schedule_id bigint NOT NULL, + length integer NOT NULL, + length_unit smallint NOT NULL, + starts_at timestamp with time zone NOT NULL, + name text NOT NULL, + active_period_start time without time zone, + active_period_end time without time zone, + ends_at timestamp with time zone, + CONSTRAINT check_5209fb5d02 CHECK ((char_length(name) <= 200)) +); + +CREATE SEQUENCE incident_management_oncall_rotations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_rotations_id_seq OWNED BY incident_management_oncall_rotations.id; + +CREATE TABLE incident_management_oncall_schedules ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + iid integer NOT NULL, + name text NOT NULL, + description text, + timezone text, + CONSTRAINT check_7ed1fd5aa7 CHECK ((char_length(description) <= 1000)), + CONSTRAINT check_cc77cbb103 CHECK ((char_length(timezone) <= 100)), + CONSTRAINT check_e6ef43a664 CHECK ((char_length(name) <= 200)) +); + +CREATE SEQUENCE incident_management_oncall_schedules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_schedules_id_seq OWNED BY incident_management_oncall_schedules.id; + +CREATE TABLE incident_management_oncall_shifts ( + id bigint NOT NULL, + rotation_id bigint NOT NULL, + participant_id bigint NOT NULL, + starts_at timestamp with time zone NOT NULL, + ends_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE incident_management_oncall_shifts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + indexed_at timestamp without time zone, + note text, + last_commit character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + last_wiki_commit bytea, + wiki_indexed_at timestamp with time zone +); + +CREATE SEQUENCE index_statuses_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE index_statuses_id_seq OWNED BY index_statuses.id; + +CREATE TABLE insights ( + id integer NOT NULL, + namespace_id integer NOT NULL, + project_id integer NOT NULL +); + +CREATE SEQUENCE insights_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE insights_id_seq OWNED BY insights.id; + +CREATE TABLE integrations ( + id integer NOT NULL, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + active boolean DEFAULT false NOT NULL, + properties text, + template boolean DEFAULT false, + push_events boolean DEFAULT true, + issues_events boolean DEFAULT true, + merge_requests_events boolean DEFAULT true, + tag_push_events boolean DEFAULT true, + note_events boolean DEFAULT true NOT NULL, + category character varying DEFAULT 'common'::character varying NOT NULL, + wiki_page_events boolean DEFAULT true, + pipeline_events boolean DEFAULT false NOT NULL, + confidential_issues_events boolean DEFAULT true NOT NULL, + commit_events boolean DEFAULT true NOT NULL, + job_events boolean DEFAULT false NOT NULL, + confidential_note_events boolean DEFAULT true, + deployment_events boolean DEFAULT false NOT NULL, + comment_on_event_enabled boolean DEFAULT true NOT NULL, + instance boolean DEFAULT false NOT NULL, + comment_detail smallint, + inherit_from_id bigint, + alert_events boolean, + 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)) +); + +CREATE SEQUENCE integrations_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE integrations_id_seq OWNED BY integrations.id; + +CREATE TABLE internal_ids ( + id bigint NOT NULL, + project_id integer, + usage integer NOT NULL, + last_value integer NOT NULL, + namespace_id integer +); + +CREATE SEQUENCE internal_ids_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE internal_ids_id_seq OWNED BY internal_ids.id; + +CREATE TABLE ip_restrictions ( + id bigint NOT NULL, + group_id integer NOT NULL, + range character varying NOT NULL +); + +CREATE SEQUENCE ip_restrictions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ip_restrictions_id_seq OWNED BY ip_restrictions.id; + +CREATE TABLE issuable_metric_images ( + 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, + 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)) +); + +CREATE SEQUENCE issuable_metric_images_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_metric_images_id_seq OWNED BY issuable_metric_images.id; + +CREATE TABLE issuable_severities ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + severity smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE issuable_severities_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_severities_id_seq OWNED BY issuable_severities.id; + +CREATE TABLE issuable_slas ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + due_at timestamp with time zone NOT NULL, + label_applied boolean DEFAULT false NOT NULL, + issuable_closed boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE issuable_slas_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_slas_id_seq OWNED BY issuable_slas.id; + +CREATE TABLE issue_assignees ( + user_id integer NOT NULL, + 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, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + email text NOT NULL, + CONSTRAINT check_2c321d408d CHECK ((char_length(email) <= 255)) +); + +CREATE SEQUENCE issue_email_participants_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + target_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + link_type smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE issue_links_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issue_links_id_seq OWNED BY issue_links.id; + +CREATE TABLE issue_metrics ( + id integer NOT NULL, + issue_id integer NOT NULL, + first_mentioned_in_commit_at timestamp without time zone, + first_associated_with_milestone_at timestamp without time zone, + first_added_to_board_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE issue_metrics_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issue_metrics_id_seq OWNED BY issue_metrics.id; + +CREATE TABLE issue_tracker_data ( + id bigint NOT NULL, + service_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + encrypted_project_url character varying, + encrypted_project_url_iv character varying, + encrypted_issues_url character varying, + encrypted_issues_url_iv character varying, + encrypted_new_issue_url character varying, + encrypted_new_issue_url_iv character varying +); + +CREATE SEQUENCE issue_tracker_data_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE issue_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issue_user_mentions_id_seq OWNED BY issue_user_mentions.id; + +CREATE TABLE issues ( + id integer NOT NULL, + title character varying, + author_id integer, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + description text, + milestone_id integer, + iid integer, + updated_by_id integer, + confidential boolean DEFAULT false NOT NULL, + due_date date, + moved_to_id integer, + lock_version integer DEFAULT 0, + title_html text, + description_html text, + time_estimate integer, + relative_position integer, + cached_markdown_version integer, + last_edited_at timestamp without time zone, + last_edited_by_id integer, + discussion_locked boolean, + closed_at timestamp with time zone, + closed_by_id integer, + state_id smallint DEFAULT 1 NOT NULL, + service_desk_reply_to character varying, + weight integer, + duplicated_to_id integer, + promoted_to_epic_id integer, + health_status smallint, + sprint_id bigint, + external_key character varying(255), + blocking_issues_count integer DEFAULT 0 NOT NULL, + issue_type smallint DEFAULT 0 NOT NULL, + upvotes_count integer DEFAULT 0 NOT NULL, + work_item_type_id bigint +); + +CREATE SEQUENCE issues_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issues_id_seq OWNED BY issues.id; + +CREATE TABLE issues_prometheus_alert_events ( + issue_id bigint NOT NULL, + prometheus_alert_event_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE TABLE issues_self_managed_prometheus_alert_events ( + issue_id bigint NOT NULL, + self_managed_prometheus_alert_event_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE TABLE iterations_cadences ( + id bigint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + start_date date, + last_run_date date, + duration_in_weeks integer, + iterations_in_advance integer, + active boolean DEFAULT true NOT NULL, + automatic boolean DEFAULT true NOT NULL, + title text NOT NULL, + roll_over boolean DEFAULT false NOT NULL, + description text, + CONSTRAINT check_5c5d2b44bd CHECK ((char_length(description) <= 5000)), + CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255)) +); + +CREATE SEQUENCE iterations_cadences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE iterations_cadences_id_seq OWNED BY iterations_cadences.id; + +CREATE TABLE jira_connect_installations ( + id bigint NOT NULL, + client_key character varying, + encrypted_shared_secret character varying, + encrypted_shared_secret_iv character varying, + base_url character varying, + instance_url text, + CONSTRAINT check_4c6abed669 CHECK ((char_length(instance_url) <= 255)) +); + +CREATE SEQUENCE jira_connect_installations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE jira_connect_installations_id_seq OWNED BY jira_connect_installations.id; + +CREATE TABLE jira_connect_subscriptions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + jira_connect_installation_id bigint NOT NULL, + namespace_id integer NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE jira_connect_subscriptions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE jira_connect_subscriptions_id_seq OWNED BY jira_connect_subscriptions.id; + +CREATE TABLE jira_imports ( + id bigint NOT NULL, + project_id bigint NOT NULL, + user_id bigint, + label_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + finished_at timestamp with time zone, + jira_project_xid bigint NOT NULL, + total_issue_count integer DEFAULT 0 NOT NULL, + imported_issues_count integer DEFAULT 0 NOT NULL, + failed_to_import_count integer DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + jid character varying(255), + jira_project_key character varying(255) NOT NULL, + jira_project_name character varying(255) NOT NULL, + scheduled_at timestamp with time zone, + error_message text, + CONSTRAINT check_9ed451c5b1 CHECK ((char_length(error_message) <= 1000)) +); + +CREATE SEQUENCE jira_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE jira_imports_id_seq OWNED BY jira_imports.id; + +CREATE TABLE jira_tracker_data ( + id bigint NOT NULL, + service_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + encrypted_url character varying, + encrypted_url_iv character varying, + encrypted_api_url character varying, + encrypted_api_url_iv character varying, + encrypted_username character varying, + encrypted_username_iv character varying, + encrypted_password character varying, + encrypted_password_iv character varying, + jira_issue_transition_id character varying, + project_key text, + issues_enabled boolean DEFAULT false NOT NULL, + deployment_type smallint DEFAULT 0 NOT NULL, + vulnerabilities_issuetype text, + vulnerabilities_enabled boolean DEFAULT false NOT NULL, + jira_issue_transition_automatic boolean DEFAULT false NOT NULL, + CONSTRAINT check_0bf84b76e9 CHECK ((char_length(vulnerabilities_issuetype) <= 255)), + CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255)) +); + +CREATE SEQUENCE jira_tracker_data_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE jira_tracker_data_id_seq OWNED BY jira_tracker_data.id; + +CREATE TABLE keys ( + id integer NOT NULL, + user_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + key text, + title character varying, + type character varying, + fingerprint character varying, + public boolean DEFAULT false NOT NULL, + last_used_at timestamp without time zone, + fingerprint_sha256 bytea, + expires_at timestamp with time zone, + expiry_notification_delivered_at timestamp with time zone, + before_expiry_notification_delivered_at timestamp with time zone +); + +CREATE SEQUENCE keys_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE keys_id_seq OWNED BY keys.id; + +CREATE TABLE label_links ( + id integer NOT NULL, + label_id integer, + target_id integer, + target_type character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + +CREATE SEQUENCE label_links_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE label_links_id_seq OWNED BY label_links.id; + +CREATE TABLE label_priorities ( + id integer NOT NULL, + project_id integer NOT NULL, + label_id integer NOT NULL, + priority integer NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE label_priorities_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE label_priorities_id_seq OWNED BY label_priorities.id; + +CREATE TABLE labels ( + id integer NOT NULL, + title character varying, + color character varying, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + template boolean DEFAULT false, + description character varying, + description_html text, + type character varying, + group_id integer, + cached_markdown_version integer +); + +CREATE SEQUENCE labels_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE labels_id_seq OWNED BY labels.id; + +CREATE TABLE ldap_group_links ( + id integer NOT NULL, + cn character varying, + group_access integer NOT NULL, + group_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + provider character varying, + filter character varying +); + +CREATE SEQUENCE ldap_group_links_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ldap_group_links_id_seq OWNED BY ldap_group_links.id; + +CREATE TABLE lfs_file_locks ( + id integer NOT NULL, + project_id integer NOT NULL, + user_id integer NOT NULL, + created_at timestamp without time zone NOT NULL, + path character varying(511) +); + +CREATE SEQUENCE lfs_file_locks_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + size bigint NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + file character varying, + file_store integer DEFAULT 1, + CONSTRAINT check_eecfc5717d CHECK ((file_store IS NOT NULL)) +); + +CREATE SEQUENCE lfs_objects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE lfs_objects_id_seq OWNED BY lfs_objects.id; + +CREATE TABLE lfs_objects_projects ( + id integer NOT NULL, + lfs_object_id integer NOT NULL, + project_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + repository_type smallint +); + +CREATE SEQUENCE lfs_objects_projects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE lfs_objects_projects_id_seq OWNED BY lfs_objects_projects.id; + +CREATE TABLE licenses ( + id integer NOT NULL, + data text NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + cloud boolean DEFAULT false, + last_synced_at timestamp with time zone +); + +CREATE SEQUENCE licenses_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE licenses_id_seq OWNED BY licenses.id; + +CREATE TABLE list_user_preferences ( + id bigint NOT NULL, + user_id bigint NOT NULL, + list_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + collapsed boolean +); + +CREATE SEQUENCE list_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE list_user_preferences_id_seq OWNED BY list_user_preferences.id; + +CREATE TABLE lists ( + id integer NOT NULL, + board_id integer NOT NULL, + label_id integer, + list_type integer DEFAULT 1 NOT NULL, + "position" integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + milestone_id integer, + user_id integer, + max_issue_count integer DEFAULT 0 NOT NULL, + max_issue_weight integer DEFAULT 0 NOT NULL, + limit_metric character varying(20), + iteration_id bigint +); + +CREATE SEQUENCE lists_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + source_id integer NOT NULL, + source_type character varying NOT NULL, + user_id integer, + notification_level integer NOT NULL, + type character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + created_by_id integer, + invite_email character varying, + invite_token character varying, + invite_accepted_at timestamp without time zone, + requested_at timestamp without time zone, + expires_at date, + ldap boolean DEFAULT false NOT NULL, + override boolean DEFAULT false NOT NULL, + invite_email_success boolean DEFAULT true NOT NULL, + state smallint DEFAULT 0, + member_namespace_id bigint +); + +CREATE SEQUENCE members_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE members_id_seq OWNED BY members.id; + +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, + state smallint DEFAULT 0 NOT NULL, + updated_state_by_user_id bigint +); + +CREATE SEQUENCE merge_request_assignees_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_assignees_id_seq OWNED BY merge_request_assignees.id; + +CREATE TABLE merge_request_blocks ( + id bigint NOT NULL, + blocking_merge_request_id integer NOT NULL, + blocked_merge_request_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE merge_request_blocks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_blocks_id_seq OWNED BY merge_request_blocks.id; + +CREATE TABLE merge_request_cleanup_schedules ( + merge_request_id bigint NOT NULL, + scheduled_at timestamp with time zone NOT NULL, + completed_at timestamp with time zone, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + failed_count integer DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq OWNED BY merge_request_cleanup_schedules.merge_request_id; + +CREATE TABLE merge_request_context_commit_diff_files ( + merge_request_context_commit_id bigint NOT NULL, + sha bytea NOT NULL, + relative_order integer NOT NULL, + a_mode character varying(255) NOT NULL, + b_mode character varying(255) NOT NULL, + new_file boolean NOT NULL, + renamed_file boolean NOT NULL, + deleted_file boolean NOT NULL, + too_large boolean NOT NULL, + "binary" boolean, + new_path text NOT NULL, + old_path text NOT NULL, + diff text +); + +CREATE TABLE merge_request_context_commits ( + id bigint NOT NULL, + merge_request_id bigint, + authored_date timestamp with time zone, + committed_date timestamp with time zone, + sha bytea NOT NULL, + relative_order integer NOT NULL, + author_name text, + author_email text, + committer_name text, + committer_email text, + message text, + trailers jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE merge_request_context_commits_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_context_commits_id_seq OWNED BY merge_request_context_commits.id; + +CREATE TABLE merge_request_diff_commit_users ( + id bigint NOT NULL, + name text, + email text, + CONSTRAINT check_147358fc42 CHECK ((char_length(name) <= 512)), + CONSTRAINT check_f5fa206cf7 CHECK ((char_length(email) <= 512)), + CONSTRAINT merge_request_diff_commit_users_name_or_email_existence CHECK (((COALESCE(name, ''::text) <> ''::text) OR (COALESCE(email, ''::text) <> ''::text))) +); + +CREATE SEQUENCE merge_request_diff_commit_users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_diff_commit_users_id_seq OWNED BY merge_request_diff_commit_users.id; + +CREATE TABLE merge_request_diff_commits ( + authored_date timestamp with time zone, + committed_date timestamp with time zone, + merge_request_diff_id integer NOT NULL, + relative_order integer NOT NULL, + sha bytea NOT NULL, + message text, + trailers jsonb DEFAULT '{}'::jsonb NOT NULL, + commit_author_id bigint, + committer_id bigint +); + +CREATE TABLE merge_request_diff_details ( + merge_request_diff_id bigint NOT NULL, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_retry_count smallint, + verification_checksum bytea, + verification_failure text, + verification_state smallint DEFAULT 0 NOT NULL, + verification_started_at timestamp with time zone, + CONSTRAINT check_81429e3622 CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE SEQUENCE merge_request_diff_details_merge_request_diff_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_diff_details_merge_request_diff_id_seq OWNED BY merge_request_diff_details.merge_request_diff_id; + +CREATE TABLE merge_request_diff_files ( + merge_request_diff_id integer NOT NULL, + relative_order integer NOT NULL, + new_file boolean NOT NULL, + renamed_file boolean NOT NULL, + deleted_file boolean NOT NULL, + too_large boolean NOT NULL, + a_mode character varying NOT NULL, + b_mode character varying NOT NULL, + new_path text NOT NULL, + old_path text NOT NULL, + diff text, + "binary" boolean, + external_diff_offset integer, + external_diff_size integer +); + +CREATE TABLE merge_request_diffs ( + id integer NOT NULL, + state character varying, + merge_request_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + base_commit_sha character varying, + real_size character varying, + head_commit_sha character varying, + start_commit_sha character varying, + commits_count integer, + external_diff character varying, + external_diff_store integer DEFAULT 1, + stored_externally boolean, + files_count smallint, + sorted boolean DEFAULT false NOT NULL, + diff_type smallint DEFAULT 1 NOT NULL, + CONSTRAINT check_93ee616ac9 CHECK ((external_diff_store IS NOT NULL)) +); + +CREATE SEQUENCE merge_request_diffs_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_diffs_id_seq OWNED BY merge_request_diffs.id; + +CREATE TABLE merge_request_metrics ( + id integer NOT NULL, + merge_request_id integer NOT NULL, + latest_build_started_at timestamp without time zone, + latest_build_finished_at timestamp without time zone, + first_deployed_to_production_at timestamp without time zone, + merged_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + pipeline_id integer, + merged_by_id integer, + latest_closed_by_id integer, + latest_closed_at timestamp with time zone, + first_comment_at timestamp with time zone, + first_commit_at timestamp with time zone, + last_commit_at timestamp with time zone, + diff_size integer, + modified_paths_size integer, + commits_count integer, + first_approved_at timestamp with time zone, + first_reassigned_at timestamp with time zone, + added_lines integer, + removed_lines integer, + target_project_id integer, + CONSTRAINT check_e03d0900bf CHECK ((target_project_id IS NOT NULL)) +); + +CREATE SEQUENCE merge_request_metrics_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_metrics_id_seq OWNED BY merge_request_metrics.id; + +CREATE TABLE merge_request_reviewers ( + id bigint NOT NULL, + user_id bigint NOT NULL, + merge_request_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + state smallint DEFAULT 0 NOT NULL, + updated_state_by_user_id bigint +); + +CREATE SEQUENCE merge_request_reviewers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_reviewers_id_seq OWNED BY merge_request_reviewers.id; + +CREATE TABLE merge_request_user_mentions ( + id bigint NOT NULL, + merge_request_id integer NOT NULL, + note_id integer, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE merge_request_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_user_mentions_id_seq OWNED BY merge_request_user_mentions.id; + +CREATE TABLE merge_requests ( + id integer NOT NULL, + target_branch character varying NOT NULL, + source_branch character varying NOT NULL, + source_project_id integer, + author_id integer, + assignee_id integer, + title character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + milestone_id integer, + merge_status character varying DEFAULT 'unchecked'::character varying NOT NULL, + target_project_id integer NOT NULL, + iid integer, + description text, + updated_by_id integer, + merge_error text, + merge_params text, + merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL, + merge_user_id integer, + merge_commit_sha character varying, + rebase_commit_sha character varying, + in_progress_merge_commit_sha character varying, + lock_version integer DEFAULT 0, + title_html text, + description_html text, + time_estimate integer, + cached_markdown_version integer, + last_edited_at timestamp without time zone, + last_edited_by_id integer, + head_pipeline_id integer, + merge_jid character varying, + discussion_locked boolean, + latest_merge_request_diff_id integer, + allow_maintainer_to_push boolean DEFAULT true, + squash boolean DEFAULT false NOT NULL, + state_id smallint DEFAULT 1 NOT NULL, + approvals_before_merge integer, + rebase_jid character varying, + squash_commit_sha bytea, + sprint_id bigint, + merge_ref_sha bytea, + draft boolean DEFAULT false NOT NULL +); + +CREATE TABLE merge_requests_closing_issues ( + id integer NOT NULL, + merge_request_id integer NOT NULL, + issue_id integer NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE merge_requests_closing_issues_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_requests_id_seq OWNED BY merge_requests.id; + +CREATE TABLE merge_trains ( + id bigint NOT NULL, + merge_request_id integer NOT NULL, + user_id integer NOT NULL, + pipeline_id integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + target_project_id integer NOT NULL, + target_branch text NOT NULL, + status smallint DEFAULT 0 NOT NULL, + merged_at timestamp with time zone, + duration integer +); + +CREATE SEQUENCE merge_trains_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_trains_id_seq OWNED BY merge_trains.id; + +CREATE TABLE metrics_dashboard_annotations ( + id bigint NOT NULL, + starting_at timestamp with time zone NOT NULL, + ending_at timestamp with time zone, + environment_id bigint, + cluster_id bigint, + dashboard_path character varying(255) NOT NULL, + panel_xid character varying(255), + description text NOT NULL +); + +CREATE SEQUENCE metrics_dashboard_annotations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE metrics_dashboard_annotations_id_seq OWNED BY metrics_dashboard_annotations.id; + +CREATE TABLE metrics_users_starred_dashboards ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + user_id bigint NOT NULL, + dashboard_path text NOT NULL, + CONSTRAINT check_79a84a0f57 CHECK ((char_length(dashboard_path) <= 255)) +); + +CREATE SEQUENCE metrics_users_starred_dashboards_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE metrics_users_starred_dashboards_id_seq OWNED BY metrics_users_starred_dashboards.id; + +CREATE TABLE milestone_releases ( + milestone_id bigint NOT NULL, + release_id bigint NOT NULL +); + +CREATE TABLE milestones ( + id integer NOT NULL, + title character varying NOT NULL, + project_id integer, + description text, + due_date date, + created_at timestamp without time zone, + updated_at timestamp without time zone, + state character varying, + iid integer, + title_html text, + description_html text, + start_date date, + cached_markdown_version integer, + group_id integer +); + +CREATE SEQUENCE milestones_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE milestones_id_seq OWNED BY milestones.id; + +CREATE TABLE namespace_admin_notes ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id bigint NOT NULL, + note text, + CONSTRAINT check_e9d2e71b5d CHECK ((char_length(note) <= 1000)) +); + +CREATE SEQUENCE namespace_admin_notes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_admin_notes_id_seq OWNED BY namespace_admin_notes.id; + +CREATE TABLE namespace_aggregation_schedules ( + namespace_id integer NOT NULL +); + +CREATE SEQUENCE namespace_aggregation_schedules_namespace_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_aggregation_schedules_namespace_id_seq OWNED BY namespace_aggregation_schedules.namespace_id; + +CREATE TABLE namespace_limits ( + additional_purchased_storage_size bigint DEFAULT 0 NOT NULL, + additional_purchased_storage_ends_on date, + namespace_id integer NOT NULL, + temporary_storage_increase_ends_on date +); + +CREATE TABLE namespace_package_settings ( + namespace_id bigint NOT NULL, + maven_duplicates_allowed boolean DEFAULT true NOT NULL, + maven_duplicate_exception_regex text DEFAULT ''::text NOT NULL, + generic_duplicates_allowed boolean DEFAULT true NOT NULL, + generic_duplicate_exception_regex text DEFAULT ''::text NOT NULL, + CONSTRAINT check_31340211b1 CHECK ((char_length(generic_duplicate_exception_regex) <= 255)), + CONSTRAINT check_d63274b2b6 CHECK ((char_length(maven_duplicate_exception_regex) <= 255)) +); + +CREATE TABLE namespace_root_storage_statistics ( + namespace_id integer NOT NULL, + updated_at timestamp with time zone NOT NULL, + repository_size bigint DEFAULT 0 NOT NULL, + lfs_objects_size bigint DEFAULT 0 NOT NULL, + wiki_size bigint DEFAULT 0 NOT NULL, + build_artifacts_size bigint DEFAULT 0 NOT NULL, + storage_size bigint DEFAULT 0 NOT NULL, + 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, + dependency_proxy_size bigint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_root_storage_statistics_namespace_id_seq OWNED BY namespace_root_storage_statistics.namespace_id; + +CREATE TABLE namespace_settings ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id integer NOT NULL, + prevent_forking_outside_group boolean DEFAULT false NOT NULL, + allow_mfa_for_subgroups boolean DEFAULT true NOT NULL, + default_branch_name text, + repository_read_only boolean DEFAULT false NOT NULL, + delayed_project_removal boolean, + lock_delayed_project_removal boolean DEFAULT false NOT NULL, + resource_access_token_creation_allowed boolean DEFAULT true NOT NULL, + prevent_sharing_groups_outside_hierarchy boolean DEFAULT false NOT NULL, + 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)) +); + +CREATE TABLE namespace_statistics ( + id integer NOT NULL, + namespace_id integer NOT NULL, + 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, + dependency_proxy_size bigint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE namespace_statistics_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_statistics_id_seq OWNED BY namespace_statistics.id; + +CREATE TABLE namespaces ( + id integer NOT NULL, + name character varying NOT NULL, + path character varying NOT NULL, + owner_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + 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, + visibility_level integer DEFAULT 20 NOT NULL, + request_access_enabled boolean DEFAULT true NOT NULL, + description_html text, + lfs_enabled boolean, + parent_id integer, + require_two_factor_authentication boolean DEFAULT false NOT NULL, + two_factor_grace_period integer DEFAULT 48 NOT NULL, + cached_markdown_version integer, + runners_token character varying, + project_creation_level integer, + runners_token_encrypted character varying, + auto_devops_enabled boolean, + custom_project_templates_group_id integer, + file_template_project_id integer, + ldap_sync_error character varying, + ldap_sync_last_successful_update_at timestamp without time zone, + ldap_sync_last_sync_at timestamp without time zone, + ldap_sync_last_update_at timestamp without time zone, + repository_size_limit bigint, + saml_discovery_token character varying, + shared_runners_minutes_limit integer, + extra_shared_runners_minutes_limit integer, + ldap_sync_status character varying DEFAULT 'ready'::character varying NOT NULL, + membership_lock boolean DEFAULT false, + last_ci_minutes_notification_at timestamp with time zone, + last_ci_minutes_usage_notification_level integer, + subgroup_creation_level integer DEFAULT 1, + emails_disabled boolean, + max_pages_size integer, + max_artifacts_size integer, + mentions_disabled boolean, + default_branch_protection smallint, + unlock_membership_to_ldap boolean, + max_personal_access_token_lifetime integer, + push_rule_id bigint, + shared_runners_enabled boolean DEFAULT true NOT NULL, + allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, + traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, + tmp_project_id integer +); + +CREATE SEQUENCE namespaces_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + diff text NOT NULL, + new_file boolean NOT NULL, + renamed_file boolean NOT NULL, + deleted_file boolean NOT NULL, + a_mode character varying NOT NULL, + b_mode character varying NOT NULL, + new_path text NOT NULL, + old_path text NOT NULL +); + +CREATE SEQUENCE note_diff_files_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE note_diff_files_id_seq OWNED BY note_diff_files.id; + +CREATE TABLE notes ( + id integer NOT NULL, + note text, + noteable_type character varying, + author_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + project_id integer, + attachment character varying, + line_code character varying, + commit_id character varying, + noteable_id integer, + system boolean DEFAULT false NOT NULL, + st_diff text, + updated_by_id integer, + type character varying, + "position" text, + original_position text, + resolved_at timestamp without time zone, + resolved_by_id integer, + discussion_id character varying, + note_html text, + cached_markdown_version integer, + change_position text, + resolved_by_push boolean, + review_id bigint, + confidential boolean, + last_edited_at timestamp with time zone +); + +CREATE SEQUENCE notes_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE notes_id_seq OWNED BY notes.id; + +CREATE TABLE notification_settings ( + id integer NOT NULL, + user_id integer NOT NULL, + source_type character varying, + source_id integer, + level integer DEFAULT 0 NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + new_note boolean, + new_issue boolean, + reopen_issue boolean, + close_issue boolean, + reassign_issue boolean, + new_merge_request boolean, + reopen_merge_request boolean, + close_merge_request boolean, + reassign_merge_request boolean, + merge_merge_request boolean, + failed_pipeline boolean, + success_pipeline boolean, + push_to_merge_request boolean, + issue_due boolean, + notification_email character varying, + new_epic boolean, + new_release boolean, + fixed_pipeline boolean, + moved_project boolean DEFAULT true NOT NULL, + change_reviewer_merge_request boolean, + merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE notification_settings_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE notification_settings_id_seq OWNED BY notification_settings.id; + +CREATE TABLE oauth_access_grants ( + id integer NOT NULL, + resource_owner_id integer NOT NULL, + application_id integer NOT NULL, + token character varying NOT NULL, + expires_in integer NOT NULL, + redirect_uri text NOT NULL, + created_at timestamp without time zone NOT NULL, + revoked_at timestamp without time zone, + scopes character varying, + code_challenge text, + code_challenge_method text, + CONSTRAINT oauth_access_grants_code_challenge CHECK ((char_length(code_challenge) <= 128)), + CONSTRAINT oauth_access_grants_code_challenge_method CHECK ((char_length(code_challenge_method) <= 5)) +); + +CREATE SEQUENCE oauth_access_grants_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE oauth_access_grants_id_seq OWNED BY oauth_access_grants.id; + +CREATE TABLE oauth_access_tokens ( + id integer NOT NULL, + resource_owner_id integer, + application_id integer, + token character varying NOT NULL, + refresh_token character varying, + expires_in integer, + revoked_at timestamp without time zone, + created_at timestamp without time zone NOT NULL, + scopes character varying +); + +CREATE SEQUENCE oauth_access_tokens_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE oauth_access_tokens_id_seq OWNED BY oauth_access_tokens.id; + +CREATE TABLE oauth_applications ( + id integer NOT NULL, + name character varying NOT NULL, + uid character varying NOT NULL, + secret character varying NOT NULL, + redirect_uri text NOT NULL, + scopes character varying DEFAULT ''::character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + owner_id integer, + owner_type character varying, + trusted boolean DEFAULT false NOT NULL, + confidential boolean DEFAULT true NOT NULL, + expire_access_tokens boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE oauth_applications_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE oauth_applications_id_seq OWNED BY oauth_applications.id; + +CREATE TABLE oauth_openid_requests ( + id integer NOT NULL, + access_grant_id integer NOT NULL, + nonce character varying NOT NULL +); + +CREATE SEQUENCE oauth_openid_requests_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE oauth_openid_requests_id_seq OWNED BY oauth_openid_requests.id; + +CREATE TABLE onboarding_progresses ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + git_pull_at timestamp with time zone, + git_write_at timestamp with time zone, + merge_request_created_at timestamp with time zone, + pipeline_created_at timestamp with time zone, + user_added_at timestamp with time zone, + trial_started_at timestamp with time zone, + subscription_created_at timestamp with time zone, + required_mr_approvals_enabled_at timestamp with time zone, + code_owners_enabled_at timestamp with time zone, + scoped_label_created_at timestamp with time zone, + security_scan_enabled_at timestamp with time zone, + 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, + 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 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE onboarding_progresses_id_seq OWNED BY onboarding_progresses.id; + +CREATE TABLE operations_feature_flag_scopes ( + id bigint NOT NULL, + feature_flag_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + active boolean NOT NULL, + environment_scope character varying DEFAULT '*'::character varying NOT NULL, + strategies jsonb DEFAULT '[{"name": "default", "parameters": {}}]'::jsonb NOT NULL +); + +CREATE SEQUENCE operations_feature_flag_scopes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_feature_flag_scopes_id_seq OWNED BY operations_feature_flag_scopes.id; + +CREATE TABLE operations_feature_flags ( + id bigint NOT NULL, + project_id integer NOT NULL, + active boolean NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name character varying NOT NULL, + description text, + iid integer NOT NULL, + version smallint DEFAULT 1 NOT NULL +); + +CREATE TABLE operations_feature_flags_clients ( + id bigint NOT NULL, + project_id integer NOT NULL, + token_encrypted character varying +); + +CREATE SEQUENCE operations_feature_flags_clients_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_feature_flags_clients_id_seq OWNED BY operations_feature_flags_clients.id; + +CREATE SEQUENCE operations_feature_flags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_feature_flags_id_seq OWNED BY operations_feature_flags.id; + +CREATE TABLE operations_feature_flags_issues ( + id bigint NOT NULL, + feature_flag_id bigint NOT NULL, + issue_id bigint NOT NULL +); + +CREATE SEQUENCE operations_feature_flags_issues_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_feature_flags_issues_id_seq OWNED BY operations_feature_flags_issues.id; + +CREATE TABLE operations_scopes ( + id bigint NOT NULL, + strategy_id bigint NOT NULL, + environment_scope character varying(255) NOT NULL +); + +CREATE SEQUENCE operations_scopes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_scopes_id_seq OWNED BY operations_scopes.id; + +CREATE TABLE operations_strategies ( + id bigint NOT NULL, + feature_flag_id bigint NOT NULL, + name character varying(255) NOT NULL, + parameters jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE operations_strategies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_strategies_id_seq OWNED BY operations_strategies.id; + +CREATE TABLE operations_strategies_user_lists ( + id bigint NOT NULL, + strategy_id bigint NOT NULL, + user_list_id bigint NOT NULL +); + +CREATE SEQUENCE operations_strategies_user_lists_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_strategies_user_lists_id_seq OWNED BY operations_strategies_user_lists.id; + +CREATE TABLE operations_user_lists ( + 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, + iid integer NOT NULL, + name character varying(255) NOT NULL, + user_xids text DEFAULT ''::text NOT NULL +); + +CREATE SEQUENCE operations_user_lists_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_user_lists_id_seq OWNED BY operations_user_lists.id; + +CREATE TABLE packages_build_infos ( + id bigint NOT NULL, + package_id integer NOT NULL, + pipeline_id integer +); + +CREATE SEQUENCE packages_build_infos_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_build_infos_id_seq OWNED BY packages_build_infos.id; + +CREATE TABLE packages_composer_cache_files ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + delete_at timestamp with time zone, + namespace_id integer, + file_store smallint DEFAULT 1 NOT NULL, + file text NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_84f5ba81f5 CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_composer_cache_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_composer_cache_files_id_seq OWNED BY packages_composer_cache_files.id; + +CREATE TABLE packages_composer_metadata ( + package_id bigint NOT NULL, + target_sha bytea NOT NULL, + composer_json jsonb DEFAULT '{}'::jsonb NOT NULL, + version_cache_sha bytea +); + +CREATE TABLE packages_conan_file_metadata ( + id bigint NOT NULL, + package_file_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + recipe_revision character varying(255) DEFAULT '0'::character varying NOT NULL, + package_revision character varying(255), + conan_package_reference character varying(255), + conan_file_type smallint NOT NULL +); + +CREATE SEQUENCE packages_conan_file_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_conan_file_metadata_id_seq OWNED BY packages_conan_file_metadata.id; + +CREATE TABLE packages_conan_metadata ( + id bigint NOT NULL, + package_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + package_username character varying(255) NOT NULL, + package_channel character varying(255) NOT NULL +); + +CREATE SEQUENCE packages_conan_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_conan_metadata_id_seq OWNED BY packages_conan_metadata.id; + +CREATE TABLE packages_debian_file_metadata ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + package_file_id bigint NOT NULL, + file_type smallint NOT NULL, + component text, + architecture text, + fields jsonb, + CONSTRAINT check_2ebedda4b6 CHECK ((char_length(component) <= 255)), + CONSTRAINT check_e6e1fffcca CHECK ((char_length(architecture) <= 255)) +); + +CREATE TABLE packages_debian_group_architectures ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_ddb220164a CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_architectures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_architectures_id_seq OWNED BY packages_debian_group_architectures.id; + +CREATE TABLE packages_debian_group_component_files ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + component_id bigint NOT NULL, + architecture_id bigint, + size integer NOT NULL, + file_type smallint NOT NULL, + compression_type smallint, + file_store smallint DEFAULT 1 NOT NULL, + file text NOT NULL, + file_md5 bytea NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_839e1685bc CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_component_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_component_files_id_seq OWNED BY packages_debian_group_component_files.id; + +CREATE TABLE packages_debian_group_components ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_a9bc7d85be CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_components_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_components_id_seq OWNED BY packages_debian_group_components.id; + +CREATE TABLE packages_debian_group_distribution_keys ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + encrypted_private_key text NOT NULL, + encrypted_private_key_iv text NOT NULL, + encrypted_passphrase text NOT NULL, + encrypted_passphrase_iv text NOT NULL, + public_key text NOT NULL, + fingerprint text NOT NULL, + CONSTRAINT check_bc95dc3fbe CHECK ((char_length(fingerprint) <= 255)), + CONSTRAINT check_f708183491 CHECK ((char_length(public_key) <= 524288)) +); + +CREATE SEQUENCE packages_debian_group_distribution_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_distribution_keys_id_seq OWNED BY packages_debian_group_distribution_keys.id; + +CREATE TABLE packages_debian_group_distributions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + creator_id bigint, + valid_time_duration_seconds integer, + file_store smallint DEFAULT 1 NOT NULL, + automatic boolean DEFAULT true NOT NULL, + automatic_upgrades boolean DEFAULT false NOT NULL, + codename text NOT NULL, + suite text, + origin text, + label text, + version text, + description text, + file text, + file_signature text, + signed_file text, + signed_file_store smallint DEFAULT 1 NOT NULL, + CONSTRAINT check_0007e0bf61 CHECK ((char_length(signed_file) <= 255)), + CONSTRAINT check_310ac457b8 CHECK ((char_length(description) <= 255)), + CONSTRAINT check_3d6f87fc31 CHECK ((char_length(file_signature) <= 4096)), + CONSTRAINT check_3fdadf4a0c CHECK ((char_length(version) <= 255)), + CONSTRAINT check_590e18405a CHECK ((char_length(codename) <= 255)), + CONSTRAINT check_b057cd840a CHECK ((char_length(origin) <= 255)), + CONSTRAINT check_be5ed8d307 CHECK ((char_length(file) <= 255)), + CONSTRAINT check_d3244bfc0b CHECK ((char_length(label) <= 255)), + CONSTRAINT check_e7c928a24b CHECK ((char_length(suite) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_distributions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_distributions_id_seq OWNED BY packages_debian_group_distributions.id; + +CREATE TABLE packages_debian_project_architectures ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_9c2e1c99d8 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_architectures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_architectures_id_seq OWNED BY packages_debian_project_architectures.id; + +CREATE TABLE packages_debian_project_component_files ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + component_id bigint NOT NULL, + architecture_id bigint, + size integer NOT NULL, + file_type smallint NOT NULL, + compression_type smallint, + file_store smallint DEFAULT 1 NOT NULL, + file text NOT NULL, + file_md5 bytea NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_e5af03fa2d CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_component_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_component_files_id_seq OWNED BY packages_debian_project_component_files.id; + +CREATE TABLE packages_debian_project_components ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_517559f298 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_components_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_components_id_seq OWNED BY packages_debian_project_components.id; + +CREATE TABLE packages_debian_project_distribution_keys ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + encrypted_private_key text NOT NULL, + encrypted_private_key_iv text NOT NULL, + encrypted_passphrase text NOT NULL, + encrypted_passphrase_iv text NOT NULL, + public_key text NOT NULL, + fingerprint text NOT NULL, + CONSTRAINT check_9e8a5eef0a CHECK ((char_length(fingerprint) <= 255)), + CONSTRAINT check_d188f6547f CHECK ((char_length(public_key) <= 524288)) +); + +CREATE SEQUENCE packages_debian_project_distribution_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_distribution_keys_id_seq OWNED BY packages_debian_project_distribution_keys.id; + +CREATE TABLE packages_debian_project_distributions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + creator_id bigint, + valid_time_duration_seconds integer, + file_store smallint DEFAULT 1 NOT NULL, + automatic boolean DEFAULT true NOT NULL, + automatic_upgrades boolean DEFAULT false NOT NULL, + codename text NOT NULL, + suite text, + origin text, + label text, + version text, + description text, + file text, + file_signature text, + signed_file text, + signed_file_store smallint DEFAULT 1 NOT NULL, + CONSTRAINT check_6177ccd4a6 CHECK ((char_length(origin) <= 255)), + CONSTRAINT check_6f6b55a4c4 CHECK ((char_length(label) <= 255)), + CONSTRAINT check_834dabadb6 CHECK ((char_length(codename) <= 255)), + CONSTRAINT check_96965792c2 CHECK ((char_length(version) <= 255)), + CONSTRAINT check_9e5e22b7ff CHECK ((char_length(signed_file) <= 255)), + CONSTRAINT check_a56ae58a17 CHECK ((char_length(suite) <= 255)), + CONSTRAINT check_a5a2ac6af2 CHECK ((char_length(file_signature) <= 4096)), + CONSTRAINT check_b93154339f CHECK ((char_length(description) <= 255)), + CONSTRAINT check_cb4ac9599e CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_distributions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_distributions_id_seq OWNED BY packages_debian_project_distributions.id; + +CREATE TABLE packages_debian_publications ( + id bigint NOT NULL, + package_id bigint NOT NULL, + distribution_id bigint NOT NULL +); + +CREATE SEQUENCE packages_debian_publications_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_publications_id_seq OWNED BY packages_debian_publications.id; + +CREATE TABLE packages_dependencies ( + id bigint NOT NULL, + name character varying(255) NOT NULL, + version_pattern character varying(255) NOT NULL +); + +CREATE SEQUENCE packages_dependencies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_dependencies_id_seq OWNED BY packages_dependencies.id; + +CREATE TABLE packages_dependency_links ( + id bigint NOT NULL, + package_id bigint NOT NULL, + dependency_id bigint NOT NULL, + dependency_type smallint NOT NULL +); + +CREATE SEQUENCE packages_dependency_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + package_file_id bigint NOT NULL, + channel text NOT NULL, + metadata jsonb, + CONSTRAINT check_06e8d100af CHECK ((char_length(channel) <= 255)) +); + +CREATE TABLE packages_maven_metadata ( + id bigint NOT NULL, + package_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + app_group character varying NOT NULL, + app_name character varying NOT NULL, + app_version character varying, + path character varying(512) NOT NULL +); + +CREATE SEQUENCE packages_maven_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + CONSTRAINT packages_nuget_dependency_link_metadata_target_framework_constr CHECK ((char_length(target_framework) <= 255)) +); + +CREATE TABLE packages_nuget_metadata ( + package_id bigint NOT NULL, + license_url text, + project_url text, + icon_url text, + CONSTRAINT packages_nuget_metadata_icon_url_constraint CHECK ((char_length(icon_url) <= 255)), + CONSTRAINT packages_nuget_metadata_license_url_constraint CHECK ((char_length(license_url) <= 255)), + CONSTRAINT packages_nuget_metadata_project_url_constraint CHECK ((char_length(project_url) <= 255)) +); + +CREATE TABLE packages_package_file_build_infos ( + id bigint NOT NULL, + package_file_id bigint NOT NULL, + pipeline_id bigint +); + +CREATE SEQUENCE packages_package_file_build_infos_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_package_file_build_infos_id_seq OWNED BY packages_package_file_build_infos.id; + +CREATE TABLE packages_package_files ( + id bigint NOT NULL, + package_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + size bigint, + file_store integer DEFAULT 1, + file_md5 bytea, + file_sha1 bytea, + file_name character varying NOT NULL, + file text NOT NULL, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_failure character varying(255), + verification_retry_count integer, + file_sha256 bytea, + verification_checksum bytea, + verification_state smallint DEFAULT 0 NOT NULL, + verification_started_at timestamp with time zone, + status smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_4c5e6bb0b3 CHECK ((file_store IS NOT NULL)) +); + +CREATE SEQUENCE packages_package_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_package_files_id_seq OWNED BY packages_package_files.id; + +CREATE TABLE packages_packages ( + id bigint NOT NULL, + project_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name character varying NOT NULL, + version character varying, + package_type smallint NOT NULL, + creator_id integer, + status smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE packages_packages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_packages_id_seq OWNED BY packages_packages.id; + +CREATE TABLE packages_pypi_metadata ( + package_id bigint NOT NULL, + required_python text DEFAULT ''::text, + CONSTRAINT check_0d9aed55b2 CHECK ((required_python IS NOT NULL)), + CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255)) +); + +CREATE TABLE packages_rubygems_metadata ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + package_id bigint NOT NULL, + authors text, + files text, + summary text, + description text, + email text, + homepage text, + licenses text, + metadata text, + author text, + bindir text, + cert_chain text, + executables text, + extensions text, + extra_rdoc_files text, + platform text, + post_install_message text, + rdoc_options text, + require_paths text, + required_ruby_version text, + required_rubygems_version text, + requirements text, + rubygems_version text, + signing_key text, + CONSTRAINT check_0154a18c82 CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_22814c771b CHECK ((char_length(email) <= 255)), + CONSTRAINT check_242293030e CHECK ((char_length(extensions) <= 255)), + CONSTRAINT check_27619a7922 CHECK ((char_length(rubygems_version) <= 255)), + CONSTRAINT check_3d1b6f3a39 CHECK ((char_length(post_install_message) <= 255)), + CONSTRAINT check_545f7606f9 CHECK ((char_length(required_rubygems_version) <= 255)), + CONSTRAINT check_5988451714 CHECK ((char_length(executables) <= 255)), + CONSTRAINT check_5f9c84ea17 CHECK ((char_length(platform) <= 255)), + CONSTRAINT check_64f1cecf05 CHECK ((char_length(requirements) <= 255)), + CONSTRAINT check_6ac7043c50 CHECK ((char_length(extra_rdoc_files) <= 255)), + CONSTRAINT check_6ff3abe325 CHECK ((char_length(cert_chain) <= 255)), + CONSTRAINT check_7cb01436df CHECK ((char_length(licenses) <= 255)), + CONSTRAINT check_8be21d92e7 CHECK ((char_length(summary) <= 1024)), + CONSTRAINT check_946cb96acb CHECK ((char_length(homepage) <= 255)), + CONSTRAINT check_9824fc9efc CHECK ((char_length(bindir) <= 255)), + CONSTRAINT check_994b68eb64 CHECK ((char_length(authors) <= 255)), + CONSTRAINT check_9d42fa48ae CHECK ((char_length(signing_key) <= 255)), + CONSTRAINT check_b0f4f8c853 CHECK ((char_length(files) <= 255)), + CONSTRAINT check_b7b296b420 CHECK ((char_length(author) <= 255)), + CONSTRAINT check_bf16b21a47 CHECK ((char_length(rdoc_options) <= 255)), + CONSTRAINT check_ca641a3354 CHECK ((char_length(required_ruby_version) <= 255)), + CONSTRAINT check_ea02f4800f CHECK ((char_length(metadata) <= 30000)), + CONSTRAINT check_f76bad1a9a CHECK ((char_length(require_paths) <= 255)) +); + +CREATE TABLE packages_tags ( + id bigint NOT NULL, + package_id integer NOT NULL, + name character varying(255) NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE packages_tags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +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, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + ci_build_id bigint, + file_store smallint NOT NULL, + file text NOT NULL, + file_count integer NOT NULL, + file_sha256 bytea NOT NULL, + size bigint, + CONSTRAINT check_5f9132a958 CHECK ((size IS NOT NULL)), + CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE pages_deployments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pages_deployments_id_seq OWNED BY pages_deployments.id; + +CREATE TABLE pages_domain_acme_orders ( + id bigint NOT NULL, + pages_domain_id integer NOT NULL, + expires_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + url character varying NOT NULL, + challenge_token character varying NOT NULL, + challenge_file_content text NOT NULL, + encrypted_private_key text NOT NULL, + encrypted_private_key_iv text NOT NULL +); + +CREATE SEQUENCE pages_domain_acme_orders_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pages_domain_acme_orders_id_seq OWNED BY pages_domain_acme_orders.id; + +CREATE TABLE pages_domains ( + id integer NOT NULL, + project_id integer, + certificate text, + encrypted_key text, + encrypted_key_iv character varying, + encrypted_key_salt character varying, + domain character varying, + verified_at timestamp with time zone, + verification_code character varying NOT NULL, + enabled_until timestamp with time zone, + remove_at timestamp with time zone, + auto_ssl_enabled boolean DEFAULT false NOT NULL, + certificate_valid_not_before timestamp with time zone, + certificate_valid_not_after timestamp with time zone, + certificate_source smallint DEFAULT 0 NOT NULL, + wildcard boolean DEFAULT false NOT NULL, + usage smallint DEFAULT 0 NOT NULL, + scope smallint DEFAULT 2, + auto_ssl_failed boolean DEFAULT false NOT NULL, + CONSTRAINT check_ab7cf26a46 CHECK ((scope IS NOT NULL)) +); + +CREATE SEQUENCE pages_domains_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11061,157 +19477,425 @@ CREATE SEQUENCE application_settings_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE application_settings_id_seq OWNED BY application_settings.id; +ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id; -CREATE TABLE approval_merge_request_rule_sources ( +CREATE TABLE path_locks ( + id integer NOT NULL, + path character varying NOT NULL, + project_id integer, + user_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + +CREATE SEQUENCE path_locks_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE path_locks_id_seq OWNED BY path_locks.id; + +CREATE TABLE personal_access_tokens ( + id integer NOT NULL, + user_id integer NOT NULL, + name character varying NOT NULL, + revoked boolean DEFAULT false, + expires_at date, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + scopes character varying DEFAULT '--- [] +'::character varying NOT NULL, + impersonation boolean DEFAULT false NOT NULL, + token_digest character varying, + expire_notification_delivered boolean DEFAULT false NOT NULL, + last_used_at timestamp with time zone, + after_expiry_notification_delivered boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE personal_access_tokens_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE personal_access_tokens_id_seq OWNED BY personal_access_tokens.id; + +CREATE TABLE plan_limits ( + plan_id bigint NOT NULL, + ci_active_pipelines integer DEFAULT 0 NOT NULL, + ci_pipeline_size integer DEFAULT 0 NOT NULL, + ci_active_jobs integer DEFAULT 0 NOT NULL, id bigint NOT NULL, - approval_merge_request_rule_id bigint NOT NULL, - approval_project_rule_id bigint NOT NULL + project_hooks integer DEFAULT 100 NOT NULL, + group_hooks integer DEFAULT 50 NOT NULL, + ci_project_subscriptions integer DEFAULT 2 NOT NULL, + ci_pipeline_schedules integer DEFAULT 10 NOT NULL, + offset_pagination_limit integer DEFAULT 50000 NOT NULL, + ci_instance_level_variables integer DEFAULT 25 NOT NULL, + ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL, + ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_junit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_sast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dependency_scanning integer DEFAULT 350 NOT NULL, + ci_max_artifact_size_container_scanning integer DEFAULT 150 NOT NULL, + ci_max_artifact_size_dast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_codequality integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_management integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_scanning integer DEFAULT 100 NOT NULL, + ci_max_artifact_size_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_network_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dotenv integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cobertura integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_terraform integer DEFAULT 5 NOT NULL, + ci_max_artifact_size_accessibility integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cluster_applications integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_secret_detection integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_requirements integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_coverage_fuzzing integer DEFAULT 0 NOT NULL, + storage_size_limit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_browser_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_load_performance integer DEFAULT 0 NOT NULL, + ci_needs_size_limit integer DEFAULT 50 NOT NULL, + conan_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + maven_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + npm_max_file_size bigint DEFAULT 524288000 NOT NULL, + nuget_max_file_size bigint DEFAULT 524288000 NOT NULL, + pypi_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL, + project_feature_flags integer DEFAULT 200 NOT NULL, + golang_max_file_size bigint DEFAULT 104857600 NOT NULL, + debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL, + daily_invites integer DEFAULT 0 NOT NULL, + ci_pipeline_deployments integer DEFAULT 500 NOT NULL, + pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL, + rubygems_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + terraform_module_max_file_size bigint DEFAULT 1073741824 NOT NULL, + helm_max_file_size bigint DEFAULT 5242880 NOT NULL, + ci_registered_group_runners integer DEFAULT 1000 NOT NULL, + ci_registered_project_runners integer DEFAULT 1000 NOT NULL, + web_hook_calls integer DEFAULT 0 NOT NULL, + ci_daily_pipeline_schedule_triggers integer DEFAULT 0 NOT NULL, + 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, + 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 approval_merge_request_rule_sources_id_seq +CREATE SEQUENCE plan_limits_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_merge_request_rule_sources_id_seq OWNED BY approval_merge_request_rule_sources.id; - -CREATE TABLE approval_merge_request_rules ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - merge_request_id integer NOT NULL, - approvals_required smallint DEFAULT 0 NOT NULL, - name character varying NOT NULL, - rule_type smallint DEFAULT 1 NOT NULL, - report_type smallint, - section text, - modified_from_project_rule boolean DEFAULT false NOT NULL, - CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255)) -); +ALTER SEQUENCE plan_limits_id_seq OWNED BY plan_limits.id; -CREATE TABLE approval_merge_request_rules_approved_approvers ( - id bigint NOT NULL, - approval_merge_request_rule_id bigint NOT NULL, - user_id integer NOT NULL +CREATE TABLE plans ( + id integer NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + name character varying, + title character varying ); -CREATE SEQUENCE approval_merge_request_rules_approved_approvers_id_seq +CREATE SEQUENCE plans_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_merge_request_rules_approved_approvers_id_seq OWNED BY approval_merge_request_rules_approved_approvers.id; +ALTER SEQUENCE plans_id_seq OWNED BY plans.id; -CREATE TABLE approval_merge_request_rules_groups ( +CREATE TABLE pool_repositories ( id bigint NOT NULL, - approval_merge_request_rule_id bigint NOT NULL, - group_id integer NOT NULL + shard_id integer NOT NULL, + disk_path character varying, + state character varying, + source_project_id integer ); -CREATE SEQUENCE approval_merge_request_rules_groups_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE approval_merge_request_rules_groups_id_seq OWNED BY approval_merge_request_rules_groups.id; - -CREATE SEQUENCE approval_merge_request_rules_id_seq +CREATE SEQUENCE pool_repositories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_merge_request_rules_id_seq OWNED BY approval_merge_request_rules.id; +ALTER SEQUENCE pool_repositories_id_seq OWNED BY pool_repositories.id; -CREATE TABLE approval_merge_request_rules_users ( +CREATE TABLE postgres_async_indexes ( id bigint NOT NULL, - approval_merge_request_rule_id bigint NOT NULL, - user_id integer NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + definition text NOT NULL, + table_name text NOT NULL, + CONSTRAINT check_083b21157b CHECK ((char_length(definition) <= 2048)), + CONSTRAINT check_b732c6cd1d CHECK ((char_length(name) <= 63)), + CONSTRAINT check_e64ff4359e CHECK ((char_length(table_name) <= 63)) ); -CREATE SEQUENCE approval_merge_request_rules_users_id_seq +CREATE SEQUENCE postgres_async_indexes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_merge_request_rules_users_id_seq OWNED BY approval_merge_request_rules_users.id; +ALTER SEQUENCE postgres_async_indexes_id_seq OWNED BY postgres_async_indexes.id; -CREATE TABLE approval_project_rules ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - approvals_required smallint DEFAULT 0 NOT NULL, - name character varying NOT NULL, - rule_type smallint DEFAULT 0 NOT NULL, - scanners text[], - vulnerabilities_allowed smallint DEFAULT 0 NOT NULL, - severity_levels text[] DEFAULT '{}'::text[] NOT NULL -); +CREATE VIEW postgres_foreign_keys AS + SELECT pg_constraint.oid, + pg_constraint.conname AS name, + (((constrained_namespace.nspname)::text || '.'::text) || (constrained_table.relname)::text) AS constrained_table_identifier, + (((referenced_namespace.nspname)::text || '.'::text) || (referenced_table.relname)::text) AS referenced_table_identifier + FROM ((((pg_constraint + JOIN pg_class constrained_table ON ((constrained_table.oid = pg_constraint.conrelid))) + JOIN pg_class referenced_table ON ((referenced_table.oid = pg_constraint.confrelid))) + JOIN pg_namespace constrained_namespace ON ((constrained_table.relnamespace = constrained_namespace.oid))) + JOIN pg_namespace referenced_namespace ON ((referenced_table.relnamespace = referenced_namespace.oid))) + WHERE (pg_constraint.contype = 'f'::"char"); + +CREATE VIEW postgres_index_bloat_estimates AS + SELECT (((relation_stats.nspname)::text || '.'::text) || (relation_stats.idxname)::text) AS identifier, + ( + CASE + WHEN ((relation_stats.relpages)::double precision > relation_stats.est_pages_ff) THEN ((relation_stats.bs)::double precision * ((relation_stats.relpages)::double precision - relation_stats.est_pages_ff)) + ELSE (0)::double precision + END)::bigint AS bloat_size_bytes + FROM ( SELECT COALESCE(((1)::double precision + ceil((rows_hdr_pdg_stats.reltuples / floor((((((rows_hdr_pdg_stats.bs - (rows_hdr_pdg_stats.pageopqdata)::numeric) - (rows_hdr_pdg_stats.pagehdr)::numeric) * (rows_hdr_pdg_stats.fillfactor)::numeric))::double precision / ((100)::double precision * (((4)::numeric + rows_hdr_pdg_stats.nulldatahdrwidth))::double precision)))))), (0)::double precision) AS est_pages_ff, + rows_hdr_pdg_stats.bs, + rows_hdr_pdg_stats.nspname, + rows_hdr_pdg_stats.tblname, + rows_hdr_pdg_stats.idxname, + rows_hdr_pdg_stats.relpages, + rows_hdr_pdg_stats.is_na + FROM ( SELECT rows_data_stats.maxalign, + rows_data_stats.bs, + rows_data_stats.nspname, + rows_data_stats.tblname, + rows_data_stats.idxname, + rows_data_stats.reltuples, + rows_data_stats.relpages, + rows_data_stats.idxoid, + rows_data_stats.fillfactor, + (((((((rows_data_stats.index_tuple_hdr_bm + rows_data_stats.maxalign) - + CASE + WHEN ((rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign + ELSE (rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) + END))::double precision + rows_data_stats.nulldatawidth) + (rows_data_stats.maxalign)::double precision) - ( + CASE + WHEN (rows_data_stats.nulldatawidth = (0)::double precision) THEN 0 + WHEN (((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign + ELSE ((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) + END)::double precision))::numeric AS nulldatahdrwidth, + rows_data_stats.pagehdr, + rows_data_stats.pageopqdata, + rows_data_stats.is_na + FROM ( SELECT n.nspname, + i.tblname, + i.idxname, + i.reltuples, + i.relpages, + i.idxoid, + i.fillfactor, + (current_setting('block_size'::text))::numeric AS bs, + CASE + WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 + ELSE 4 + END AS maxalign, + 24 AS pagehdr, + 16 AS pageopqdata, + CASE + WHEN (max(COALESCE(s.null_frac, (0)::real)) = (0)::double precision) THEN 2 + ELSE (2 + (((32 + 8) - 1) / 8)) + END AS index_tuple_hdr_bm, + sum((((1)::double precision - COALESCE(s.null_frac, (0)::real)) * (COALESCE(s.avg_width, 1024))::double precision)) AS nulldatawidth, + (max( + CASE + WHEN (i.atttypid = ('name'::regtype)::oid) THEN 1 + ELSE 0 + END) > 0) AS is_na + FROM ((( SELECT ct.relname AS tblname, + ct.relnamespace, + ic.idxname, + ic.attpos, + ic.indkey, + ic.indkey[ic.attpos] AS indkey, + ic.reltuples, + ic.relpages, + ic.tbloid, + ic.idxoid, + ic.fillfactor, + COALESCE(a1.attnum, a2.attnum) AS attnum, + COALESCE(a1.attname, a2.attname) AS attname, + COALESCE(a1.atttypid, a2.atttypid) AS atttypid, +CASE + WHEN (a1.attnum IS NULL) THEN ic.idxname + ELSE ct.relname +END AS attrelname + FROM (((( SELECT idx_data.idxname, + idx_data.reltuples, + idx_data.relpages, + idx_data.tbloid, + idx_data.idxoid, + idx_data.fillfactor, + idx_data.indkey, + generate_series(1, (idx_data.indnatts)::integer) AS attpos + FROM ( SELECT ci.relname AS idxname, + ci.reltuples, + ci.relpages, + i_1.indrelid AS tbloid, + i_1.indexrelid AS idxoid, + COALESCE((("substring"(array_to_string(ci.reloptions, ' '::text), 'fillfactor=([0-9]+)'::text))::smallint)::integer, 90) AS fillfactor, + i_1.indnatts, + (string_to_array(textin(int2vectorout(i_1.indkey)), ' '::text))::integer[] AS indkey + FROM (pg_index i_1 + JOIN pg_class ci ON ((ci.oid = i_1.indexrelid))) + WHERE ((ci.relam = ( SELECT pg_am.oid + FROM pg_am + WHERE (pg_am.amname = 'btree'::name))) AND (ci.relpages > 0))) idx_data) ic + JOIN pg_class ct ON ((ct.oid = ic.tbloid))) + LEFT JOIN pg_attribute a1 ON (((ic.indkey[ic.attpos] <> 0) AND (a1.attrelid = ic.tbloid) AND (a1.attnum = ic.indkey[ic.attpos])))) + LEFT JOIN pg_attribute a2 ON (((ic.indkey[ic.attpos] = 0) AND (a2.attrelid = ic.idxoid) AND (a2.attnum = ic.attpos))))) i(tblname, relnamespace, idxname, attpos, indkey, indkey_1, reltuples, relpages, tbloid, idxoid, fillfactor, attnum, attname, atttypid, attrelname) + JOIN pg_namespace n ON ((n.oid = i.relnamespace))) + JOIN pg_stats s ON (((s.schemaname = n.nspname) AND (s.tablename = i.attrelname) AND (s.attname = i.attname)))) + GROUP BY n.nspname, i.tblname, i.idxname, i.reltuples, i.relpages, i.idxoid, i.fillfactor, (current_setting('block_size'::text))::numeric, + CASE + WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 + ELSE 4 + END, 24::integer, 16::integer) rows_data_stats) rows_hdr_pdg_stats) relation_stats + WHERE ((relation_stats.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])) AND (NOT relation_stats.is_na)) + ORDER BY relation_stats.nspname, relation_stats.tblname, relation_stats.idxname; + +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]))); + +CREATE VIEW postgres_partitioned_tables AS + SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, + pg_class.oid, + pg_namespace.nspname AS schema, + pg_class.relname AS name, + CASE partitioned_tables.partstrat + WHEN 'l'::"char" THEN 'list'::text + WHEN 'r'::"char" THEN 'range'::text + WHEN 'h'::"char" THEN 'hash'::text + ELSE NULL::text + END AS strategy, + array_agg(pg_attribute.attname) AS key_columns + FROM (((( SELECT pg_partitioned_table.partrelid, + pg_partitioned_table.partstrat, + unnest(pg_partitioned_table.partattrs) AS column_position + FROM pg_partitioned_table) partitioned_tables + JOIN pg_class ON ((partitioned_tables.partrelid = pg_class.oid))) + JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid))) + JOIN pg_attribute ON (((pg_attribute.attrelid = pg_class.oid) AND (pg_attribute.attnum = partitioned_tables.column_position)))) + WHERE (pg_namespace.nspname = "current_schema"()) + GROUP BY (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text), pg_class.oid, pg_namespace.nspname, pg_class.relname, + CASE partitioned_tables.partstrat + WHEN 'l'::"char" THEN 'list'::text + WHEN 'r'::"char" THEN 'range'::text + WHEN 'h'::"char" THEN 'hash'::text + ELSE NULL::text + END; + +CREATE VIEW postgres_partitions AS + SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, + pg_class.oid, + pg_namespace.nspname AS schema, + pg_class.relname AS name, + (((parent_namespace.nspname)::text || '.'::text) || (parent_class.relname)::text) AS parent_identifier, + pg_get_expr(pg_class.relpartbound, pg_inherits.inhrelid) AS condition + FROM ((((pg_class + JOIN pg_namespace ON ((pg_namespace.oid = pg_class.relnamespace))) + JOIN pg_inherits ON ((pg_class.oid = pg_inherits.inhrelid))) + JOIN pg_class parent_class ON ((pg_inherits.inhparent = parent_class.oid))) + JOIN pg_namespace parent_namespace ON ((parent_class.relnamespace = parent_namespace.oid))) + WHERE (pg_class.relispartition AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]))); -CREATE TABLE approval_project_rules_groups ( +CREATE TABLE postgres_reindex_actions ( id bigint NOT NULL, - approval_project_rule_id bigint NOT NULL, - group_id integer NOT NULL + action_start timestamp with time zone NOT NULL, + action_end timestamp with time zone, + ondisk_size_bytes_start bigint NOT NULL, + ondisk_size_bytes_end bigint, + state smallint DEFAULT 0 NOT NULL, + index_identifier text NOT NULL, + bloat_estimate_bytes_start bigint, + CONSTRAINT check_f12527622c CHECK ((char_length(index_identifier) <= 255)) ); -CREATE SEQUENCE approval_project_rules_groups_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE approval_project_rules_groups_id_seq OWNED BY approval_project_rules_groups.id; - -CREATE SEQUENCE approval_project_rules_id_seq +CREATE SEQUENCE postgres_reindex_actions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_project_rules_id_seq OWNED BY approval_project_rules.id; - -CREATE TABLE approval_project_rules_protected_branches ( - approval_project_rule_id bigint NOT NULL, - protected_branch_id bigint NOT NULL -); +ALTER SEQUENCE postgres_reindex_actions_id_seq OWNED BY postgres_reindex_actions.id; -CREATE TABLE approval_project_rules_users ( +CREATE TABLE postgres_reindex_queued_actions ( id bigint NOT NULL, - approval_project_rule_id bigint NOT NULL, - user_id integer 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 approval_project_rules_users_id_seq +CREATE SEQUENCE postgres_reindex_queued_actions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approval_project_rules_users_id_seq OWNED BY approval_project_rules_users.id; +ALTER SEQUENCE postgres_reindex_queued_actions_id_seq OWNED BY postgres_reindex_queued_actions.id; -CREATE TABLE approvals ( +CREATE TABLE programming_languages ( id integer NOT NULL, - merge_request_id integer NOT NULL, - user_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone + name character varying NOT NULL, + color character varying NOT NULL, + created_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE approvals_id_seq +CREATE SEQUENCE programming_languages_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11219,173 +19903,146 @@ CREATE SEQUENCE approvals_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE approvals_id_seq OWNED BY approvals.id; +ALTER SEQUENCE programming_languages_id_seq OWNED BY programming_languages.id; -CREATE TABLE approver_groups ( - id integer NOT NULL, - target_id integer NOT NULL, - target_type character varying NOT NULL, - group_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone +CREATE TABLE project_access_tokens ( + personal_access_token_id bigint NOT NULL, + project_id bigint NOT NULL ); -CREATE SEQUENCE approver_groups_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE approver_groups_id_seq OWNED BY approver_groups.id; +CREATE TABLE project_alerting_settings ( + project_id integer NOT NULL, + encrypted_token character varying NOT NULL, + encrypted_token_iv character varying NOT NULL +); -CREATE TABLE approvers ( - id integer NOT NULL, - target_id integer NOT NULL, - target_type character varying, - user_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone +CREATE TABLE project_aliases ( + id bigint NOT NULL, + project_id integer NOT NULL, + name character varying NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE approvers_id_seq - AS integer +CREATE SEQUENCE project_aliases_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE approvers_id_seq OWNED BY approvers.id; +ALTER SEQUENCE project_aliases_id_seq OWNED BY project_aliases.id; -CREATE TABLE atlassian_identities ( - user_id bigint NOT NULL, +CREATE TABLE project_authorizations ( + user_id integer NOT NULL, + project_id integer NOT NULL, + access_level integer NOT NULL +); + +CREATE TABLE project_auto_devops ( + id integer NOT NULL, + project_id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - expires_at timestamp with time zone, - extern_uid text NOT NULL, - encrypted_token bytea, - encrypted_token_iv bytea, - encrypted_refresh_token bytea, - encrypted_refresh_token_iv bytea, - CONSTRAINT atlassian_identities_refresh_token_iv_length_constraint CHECK ((octet_length(encrypted_refresh_token_iv) <= 12)), - CONSTRAINT atlassian_identities_refresh_token_length_constraint CHECK ((octet_length(encrypted_refresh_token) <= 512)), - CONSTRAINT atlassian_identities_token_iv_length_constraint CHECK ((octet_length(encrypted_token_iv) <= 12)), - CONSTRAINT atlassian_identities_token_length_constraint CHECK ((octet_length(encrypted_token) <= 2048)), - CONSTRAINT check_32f5779763 CHECK ((char_length(extern_uid) <= 255)) + enabled boolean, + deploy_strategy integer DEFAULT 0 NOT NULL ); -CREATE SEQUENCE atlassian_identities_user_id_seq +CREATE SEQUENCE project_auto_devops_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE atlassian_identities_user_id_seq OWNED BY atlassian_identities.user_id; +ALTER SEQUENCE project_auto_devops_id_seq OWNED BY project_auto_devops.id; -CREATE TABLE audit_events_external_audit_event_destinations ( +CREATE TABLE project_build_artifacts_size_refreshes ( id bigint NOT NULL, - namespace_id bigint NOT NULL, - destination_url text 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, - CONSTRAINT check_2feafb9daf CHECK ((char_length(destination_url) <= 255)) + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE audit_events_external_audit_event_destinations_id_seq +CREATE SEQUENCE project_build_artifacts_size_refreshes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE audit_events_external_audit_event_destinations_id_seq OWNED BY audit_events_external_audit_event_destinations.id; +ALTER SEQUENCE project_build_artifacts_size_refreshes_id_seq OWNED BY project_build_artifacts_size_refreshes.id; -CREATE TABLE authentication_events ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - user_id bigint, - result smallint NOT NULL, - ip_address inet, - provider text NOT NULL, - user_name text NOT NULL, - CONSTRAINT check_45a6cc4e80 CHECK ((char_length(user_name) <= 255)), - CONSTRAINT check_c64f424630 CHECK ((char_length(provider) <= 64)) +CREATE TABLE project_ci_cd_settings ( + id integer NOT NULL, + project_id integer NOT NULL, + group_runners_enabled boolean DEFAULT true NOT NULL, + merge_pipelines_enabled boolean, + default_git_depth integer, + forward_deployment_enabled boolean, + merge_trains_enabled boolean DEFAULT false, + 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 false NOT NULL, + runner_token_expiration_interval integer ); -CREATE SEQUENCE authentication_events_id_seq +CREATE SEQUENCE project_ci_cd_settings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE authentication_events_id_seq OWNED BY authentication_events.id; +ALTER SEQUENCE project_ci_cd_settings_id_seq OWNED BY project_ci_cd_settings.id; -CREATE TABLE award_emoji ( - id integer NOT NULL, - name character varying, - user_id integer, - awardable_type character varying, - awardable_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone +CREATE TABLE project_ci_feature_usages ( + id bigint NOT NULL, + project_id bigint NOT NULL, + feature smallint NOT NULL, + default_branch boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE award_emoji_id_seq - AS integer +CREATE SEQUENCE project_ci_feature_usages_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE award_emoji_id_seq OWNED BY award_emoji.id; - -CREATE TABLE aws_roles ( - user_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - role_arn character varying(2048), - role_external_id character varying(64) NOT NULL, - region text, - CONSTRAINT check_57adedab55 CHECK ((char_length(region) <= 255)) -); +ALTER SEQUENCE project_ci_feature_usages_id_seq OWNED BY project_ci_feature_usages.id; -CREATE TABLE background_migration_jobs ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status smallint DEFAULT 0 NOT NULL, - class_name text NOT NULL, - arguments jsonb NOT NULL, - CONSTRAINT check_b0de0a5852 CHECK ((char_length(class_name) <= 200)) +CREATE TABLE project_compliance_framework_settings ( + project_id bigint NOT NULL, + framework_id bigint, + CONSTRAINT check_d348de9e2d CHECK ((framework_id IS NOT NULL)) ); -CREATE SEQUENCE background_migration_jobs_id_seq +CREATE SEQUENCE project_compliance_framework_settings_project_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE background_migration_jobs_id_seq OWNED BY background_migration_jobs.id; +ALTER SEQUENCE project_compliance_framework_settings_project_id_seq OWNED BY project_compliance_framework_settings.project_id; -CREATE TABLE badges ( +CREATE TABLE project_custom_attributes ( id integer NOT NULL, - link_url character varying NOT NULL, - image_url character varying NOT NULL, - project_id integer, - group_id integer, - type character varying NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - name character varying(255) + project_id integer NOT NULL, + key character varying NOT NULL, + value character varying NOT NULL ); -CREATE SEQUENCE badges_id_seq +CREATE SEQUENCE project_custom_attributes_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11393,83 +20050,99 @@ CREATE SEQUENCE badges_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE badges_id_seq OWNED BY badges.id; +ALTER SEQUENCE project_custom_attributes_id_seq OWNED BY project_custom_attributes.id; -CREATE TABLE banned_users ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id bigint NOT NULL +CREATE TABLE project_daily_statistics ( + id bigint NOT NULL, + project_id integer NOT NULL, + fetch_count integer NOT NULL, + date date ); -CREATE TABLE batched_background_migration_jobs ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - started_at timestamp with time zone, - finished_at timestamp with time zone, - batched_background_migration_id bigint NOT NULL, - min_value bigint NOT NULL, - max_value bigint NOT NULL, - batch_size integer NOT NULL, - sub_batch_size integer NOT NULL, - status smallint DEFAULT 0 NOT NULL, - attempts smallint DEFAULT 0 NOT NULL, - metrics jsonb DEFAULT '{}'::jsonb NOT NULL, - pause_ms integer DEFAULT 100 NOT NULL +CREATE SEQUENCE project_daily_statistics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_daily_statistics_id_seq OWNED BY project_daily_statistics.id; + +CREATE TABLE project_deploy_tokens ( + id integer NOT NULL, + project_id integer NOT NULL, + deploy_token_id integer NOT NULL, + created_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE batched_background_migration_jobs_id_seq +CREATE SEQUENCE project_deploy_tokens_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE batched_background_migration_jobs_id_seq OWNED BY batched_background_migration_jobs.id; +ALTER SEQUENCE project_deploy_tokens_id_seq OWNED BY project_deploy_tokens.id; -CREATE TABLE batched_background_migrations ( +CREATE TABLE project_error_tracking_settings ( + project_id integer NOT NULL, + enabled boolean DEFAULT false NOT NULL, + api_url character varying, + encrypted_token character varying, + encrypted_token_iv character varying, + project_name character varying, + organization_name character varying, + integrated boolean DEFAULT true NOT NULL +); + +CREATE TABLE project_export_jobs ( 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, - min_value bigint DEFAULT 1 NOT NULL, - max_value bigint NOT NULL, - batch_size integer NOT NULL, - sub_batch_size integer NOT NULL, - "interval" smallint NOT NULL, status smallint DEFAULT 0 NOT NULL, - job_class_name text NOT NULL, - batch_class_name text DEFAULT 'PrimaryKeyBatchingStrategy'::text NOT NULL, - table_name text NOT NULL, - column_name text NOT NULL, - job_arguments jsonb DEFAULT '"[]"'::jsonb NOT NULL, - total_tuple_count bigint, - pause_ms integer DEFAULT 100 NOT NULL, - 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)), - CONSTRAINT check_e6c75b1e29 CHECK ((char_length(job_class_name) <= 100)), - CONSTRAINT check_fe10674721 CHECK ((char_length(batch_class_name) <= 100)), - CONSTRAINT check_max_value_in_range CHECK ((max_value >= min_value)), - CONSTRAINT check_positive_min_value CHECK ((min_value > 0)), - CONSTRAINT check_positive_sub_batch_size CHECK ((sub_batch_size > 0)) + jid character varying(100) NOT NULL ); -CREATE SEQUENCE batched_background_migrations_id_seq +CREATE SEQUENCE project_export_jobs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE batched_background_migrations_id_seq OWNED BY batched_background_migrations.id; +ALTER SEQUENCE project_export_jobs_id_seq OWNED BY project_export_jobs.id; -CREATE TABLE board_assignees ( +CREATE TABLE project_feature_usages ( + project_id integer NOT NULL, + jira_dvcs_cloud_last_sync_at timestamp without time zone, + jira_dvcs_server_last_sync_at timestamp without time zone +); + +CREATE TABLE project_features ( id integer NOT NULL, - board_id integer NOT NULL, - assignee_id integer NOT NULL + project_id integer NOT NULL, + merge_requests_access_level integer, + issues_access_level integer, + wiki_access_level integer, + snippets_access_level integer DEFAULT 20 NOT NULL, + builds_access_level integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + repository_access_level integer DEFAULT 20 NOT NULL, + pages_access_level integer NOT NULL, + forking_access_level integer, + metrics_dashboard_access_level integer, + analytics_access_level integer DEFAULT 20 NOT NULL, + requirements_access_level integer DEFAULT 20 NOT NULL, + operations_access_level integer DEFAULT 20 NOT NULL, + security_and_compliance_access_level integer DEFAULT 10 NOT NULL, + container_registry_access_level integer DEFAULT 0 NOT NULL, + package_registry_access_level integer DEFAULT 0 NOT NULL ); -CREATE SEQUENCE board_assignees_id_seq +CREATE SEQUENCE project_features_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11477,33 +20150,38 @@ CREATE SEQUENCE board_assignees_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE board_assignees_id_seq OWNED BY board_assignees.id; +ALTER SEQUENCE project_features_id_seq OWNED BY project_features.id; -CREATE TABLE board_group_recent_visits ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id integer, - board_id integer, - group_id integer +CREATE TABLE project_group_links ( + id integer NOT NULL, + project_id integer NOT NULL, + group_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + group_access integer DEFAULT 30 NOT NULL, + expires_at date ); -CREATE SEQUENCE board_group_recent_visits_id_seq +CREATE SEQUENCE project_group_links_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE board_group_recent_visits_id_seq OWNED BY board_group_recent_visits.id; +ALTER SEQUENCE project_group_links_id_seq OWNED BY project_group_links.id; -CREATE TABLE board_labels ( +CREATE TABLE project_import_data ( id integer NOT NULL, - board_id integer NOT NULL, - label_id integer NOT NULL + project_id integer, + data text, + encrypted_credentials text, + encrypted_credentials_iv character varying, + encrypted_credentials_salt character varying ); -CREATE SEQUENCE board_labels_id_seq +CREATE SEQUENCE project_import_data_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11511,212 +20189,315 @@ CREATE SEQUENCE board_labels_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE board_labels_id_seq OWNED BY board_labels.id; +ALTER SEQUENCE project_import_data_id_seq OWNED BY project_import_data.id; -CREATE TABLE board_project_recent_visits ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id integer, - project_id integer, - board_id integer +CREATE TABLE project_incident_management_settings ( + project_id integer NOT NULL, + create_issue boolean DEFAULT false NOT NULL, + send_email boolean DEFAULT false NOT NULL, + issue_template_key text, + pagerduty_active boolean DEFAULT false NOT NULL, + encrypted_pagerduty_token bytea, + encrypted_pagerduty_token_iv bytea, + auto_close_incident boolean DEFAULT true NOT NULL, + sla_timer boolean DEFAULT false, + sla_timer_minutes integer, + CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), + CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) ); -CREATE SEQUENCE board_project_recent_visits_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE board_project_recent_visits_id_seq OWNED BY board_project_recent_visits.id; +CREATE TABLE project_metrics_settings ( + project_id integer NOT NULL, + external_dashboard_url character varying, + dashboard_timezone smallint DEFAULT 0 NOT NULL +); -CREATE TABLE board_user_preferences ( - id bigint NOT NULL, - user_id bigint NOT NULL, - board_id bigint NOT NULL, - hide_labels boolean, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL +CREATE TABLE project_mirror_data ( + id integer NOT NULL, + project_id integer NOT NULL, + status character varying, + jid character varying, + last_error text, + last_successful_update_at timestamp with time zone, + last_update_at timestamp with time zone, + last_update_scheduled_at timestamp without time zone, + last_update_started_at timestamp without time zone, + next_execution_timestamp timestamp without time zone, + retry_count integer DEFAULT 0 NOT NULL, + correlation_id_value character varying(128) ); -CREATE SEQUENCE board_user_preferences_id_seq +CREATE SEQUENCE project_mirror_data_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE board_user_preferences_id_seq OWNED BY board_user_preferences.id; +ALTER SEQUENCE project_mirror_data_id_seq OWNED BY project_mirror_data.id; -CREATE TABLE boards ( - id integer NOT NULL, - project_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - group_id integer, - milestone_id integer, - weight integer, - name character varying DEFAULT 'Development'::character varying NOT NULL, - hide_backlog_list boolean DEFAULT false NOT NULL, - hide_closed_list boolean DEFAULT false NOT NULL, - iteration_id bigint, - iteration_cadence_id bigint +CREATE TABLE project_pages_metadata ( + project_id bigint NOT NULL, + deployed boolean DEFAULT false NOT NULL, + artifacts_archive_id bigint, + pages_deployment_id bigint ); -CREATE TABLE boards_epic_board_labels ( +CREATE TABLE project_repositories ( id bigint NOT NULL, - epic_board_id bigint NOT NULL, - label_id bigint NOT NULL + shard_id integer NOT NULL, + disk_path character varying NOT NULL, + project_id integer NOT NULL ); -CREATE SEQUENCE boards_epic_board_labels_id_seq +CREATE SEQUENCE project_repositories_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_board_labels_id_seq OWNED BY boards_epic_board_labels.id; +ALTER SEQUENCE project_repositories_id_seq OWNED BY project_repositories.id; -CREATE TABLE boards_epic_board_positions ( - id bigint NOT NULL, - epic_board_id bigint NOT NULL, - epic_id bigint NOT NULL, - relative_position integer, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL +CREATE TABLE project_repository_states ( + id integer NOT NULL, + project_id integer NOT NULL, + repository_verification_checksum bytea, + wiki_verification_checksum bytea, + last_repository_verification_failure character varying, + last_wiki_verification_failure character varying, + repository_retry_at timestamp with time zone, + wiki_retry_at timestamp with time zone, + repository_retry_count integer, + wiki_retry_count integer, + last_repository_verification_ran_at timestamp with time zone, + last_wiki_verification_ran_at timestamp with time zone ); -CREATE SEQUENCE boards_epic_board_positions_id_seq +CREATE SEQUENCE project_repository_states_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_board_positions_id_seq OWNED BY boards_epic_board_positions.id; +ALTER SEQUENCE project_repository_states_id_seq OWNED BY project_repository_states.id; -CREATE TABLE boards_epic_board_recent_visits ( +CREATE TABLE project_repository_storage_moves ( id bigint NOT NULL, - user_id bigint NOT NULL, - epic_board_id bigint NOT NULL, - group_id bigint 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, + project_id bigint NOT NULL, + state smallint DEFAULT 1 NOT NULL, + source_storage_name text NOT NULL, + destination_storage_name text NOT NULL, + CONSTRAINT project_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), + CONSTRAINT project_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) ); -CREATE SEQUENCE boards_epic_board_recent_visits_id_seq +CREATE SEQUENCE project_repository_storage_moves_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_board_recent_visits_id_seq OWNED BY boards_epic_board_recent_visits.id; +ALTER SEQUENCE project_repository_storage_moves_id_seq OWNED BY project_repository_storage_moves.id; -CREATE TABLE boards_epic_boards ( - id bigint NOT NULL, - hide_backlog_list boolean DEFAULT false NOT NULL, - hide_closed_list boolean DEFAULT false NOT NULL, - group_id bigint NOT NULL, +CREATE TABLE project_security_settings ( + project_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - name text DEFAULT 'Development'::text NOT NULL, - CONSTRAINT check_bcbbffe601 CHECK ((char_length(name) <= 255)) + auto_fix_container_scanning boolean DEFAULT true NOT NULL, + auto_fix_dast boolean DEFAULT true NOT NULL, + auto_fix_dependency_scanning boolean DEFAULT true NOT NULL, + auto_fix_sast boolean DEFAULT true NOT NULL ); -CREATE SEQUENCE boards_epic_boards_id_seq +CREATE SEQUENCE project_security_settings_project_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_boards_id_seq OWNED BY boards_epic_boards.id; +ALTER SEQUENCE project_security_settings_project_id_seq OWNED BY project_security_settings.project_id; -CREATE TABLE boards_epic_list_user_preferences ( - id bigint NOT NULL, - user_id bigint NOT NULL, - epic_list_id bigint NOT NULL, +CREATE TABLE project_settings ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - collapsed boolean DEFAULT false NOT NULL + project_id integer NOT NULL, + show_default_award_emojis boolean DEFAULT true NOT NULL, + allow_merge_on_skipped_pipeline boolean, + push_rule_id bigint, + squash_option smallint DEFAULT 3, + has_confluence boolean DEFAULT false NOT NULL, + cve_id_request_enabled boolean DEFAULT true NOT NULL, + has_vulnerabilities boolean DEFAULT false NOT NULL, + prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL, + mr_default_target_self boolean DEFAULT false NOT NULL, + previous_default_branch text, + 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 SEQUENCE boards_epic_list_user_preferences_id_seq +CREATE TABLE project_statistics ( + id integer NOT NULL, + project_id integer NOT NULL, + namespace_id integer NOT NULL, + commit_count bigint DEFAULT 0 NOT NULL, + storage_size bigint DEFAULT 0 NOT NULL, + repository_size bigint DEFAULT 0 NOT NULL, + lfs_objects_size bigint DEFAULT 0 NOT NULL, + build_artifacts_size bigint DEFAULT 0 NOT NULL, + shared_runners_seconds bigint DEFAULT 0 NOT NULL, + shared_runners_seconds_last_reset timestamp without time zone, + packages_size bigint DEFAULT 0 NOT NULL, + wiki_size bigint, + snippets_size bigint, + pipeline_artifacts_size bigint DEFAULT 0 NOT NULL, + uploads_size bigint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE project_statistics_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_list_user_preferences_id_seq OWNED BY boards_epic_list_user_preferences.id; +ALTER SEQUENCE project_statistics_id_seq OWNED BY project_statistics.id; -CREATE TABLE boards_epic_lists ( +CREATE TABLE project_topics ( id bigint NOT NULL, + project_id bigint NOT NULL, + topic_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - epic_board_id bigint NOT NULL, - label_id bigint, - "position" integer, - list_type smallint DEFAULT 1 NOT NULL, - CONSTRAINT boards_epic_lists_position_constraint CHECK (((list_type <> 1) OR (("position" IS NOT NULL) AND ("position" >= 0)))) + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE boards_epic_lists_id_seq +CREATE SEQUENCE project_topics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_epic_lists_id_seq OWNED BY boards_epic_lists.id; +ALTER SEQUENCE project_topics_id_seq OWNED BY project_topics.id; -CREATE TABLE boards_epic_user_preferences ( +CREATE TABLE project_tracing_settings ( id bigint NOT NULL, - board_id bigint NOT NULL, - user_id bigint NOT NULL, - epic_id bigint NOT NULL, - collapsed boolean DEFAULT false NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + external_url character varying NOT NULL ); -CREATE SEQUENCE boards_epic_user_preferences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE boards_epic_user_preferences_id_seq OWNED BY boards_epic_user_preferences.id; - -CREATE SEQUENCE boards_id_seq - AS integer +CREATE SEQUENCE project_tracing_settings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE boards_id_seq OWNED BY boards.id; +ALTER SEQUENCE project_tracing_settings_id_seq OWNED BY project_tracing_settings.id; -CREATE TABLE broadcast_messages ( +CREATE TABLE projects ( id integer NOT NULL, - message text NOT NULL, - starts_at timestamp without time zone NOT NULL, - ends_at timestamp without time zone NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - color character varying, - font character varying, - message_html text NOT NULL, + name character varying, + path character varying, + description text, + created_at timestamp without time zone, + updated_at timestamp without time zone, + creator_id integer, + namespace_id integer NOT NULL, + last_activity_at timestamp without time zone, + import_url character varying, + visibility_level integer DEFAULT 0 NOT NULL, + archived boolean DEFAULT false NOT NULL, + avatar character varying, + star_count integer DEFAULT 0 NOT NULL, + merge_requests_rebase_enabled boolean DEFAULT false, + import_type character varying, + import_source character varying, + merge_requests_ff_only_enabled boolean DEFAULT false NOT NULL, + shared_runners_enabled boolean DEFAULT true NOT NULL, + runners_token character varying, + build_coverage_regex character varying, + build_allow_git_fetch boolean DEFAULT true NOT NULL, + build_timeout integer DEFAULT 3600 NOT NULL, + pending_delete boolean DEFAULT false, + public_builds boolean DEFAULT true NOT NULL, + last_repository_check_failed boolean, + last_repository_check_at timestamp without time zone, + 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, + repository_read_only boolean, + request_access_enabled boolean DEFAULT true NOT NULL, + has_external_wiki boolean, + ci_config_path character varying, + lfs_enabled boolean, + description_html text, + only_allow_merge_if_all_discussions_are_resolved boolean, + printing_merge_request_link_enabled boolean DEFAULT true NOT NULL, + auto_cancel_pending_pipelines integer DEFAULT 1 NOT NULL, cached_markdown_version integer, - dismissable boolean, - target_path character varying(255), - broadcast_type smallint DEFAULT 1 NOT NULL + delete_error text, + last_repository_updated_at timestamp without time zone, + storage_version smallint, + resolve_outdated_diff_discussions boolean, + external_authorization_classification_label character varying, + jobs_cache_index integer, + pages_https_only boolean DEFAULT true, + remote_mirror_available_overridden boolean, + pool_repository_id bigint, + runners_token_encrypted character varying, + bfg_object_map character varying, + detected_repository_languages boolean, + disable_overriding_approvers_per_merge_request boolean, + external_webhook_token character varying, + issues_template text, + merge_requests_author_approval boolean DEFAULT false, + merge_requests_disable_committers_approval boolean, + merge_requests_template text, + mirror_last_successful_update_at timestamp without time zone, + mirror_last_update_at timestamp without time zone, + mirror_overwrites_diverged_branches boolean, + mirror_user_id integer, + only_mirror_protected_branches boolean, + packages_enabled boolean, + pull_mirror_available_overridden boolean, + repository_size_limit bigint, + require_password_to_approve boolean, + mirror boolean DEFAULT false NOT NULL, + mirror_trigger_builds boolean DEFAULT false NOT NULL, + reset_approvals_on_push boolean DEFAULT true, + service_desk_enabled boolean DEFAULT true, + approvals_before_merge integer DEFAULT 0 NOT NULL, + emails_disabled boolean, + max_pages_size integer, + max_artifacts_size integer, + pull_mirror_branch_prefix character varying(50), + marked_for_deletion_at date, + marked_for_deletion_by_user_id integer, + remove_source_branch_after_merge boolean, + suggestion_commit_message character varying(255), + autoclose_referenced_issues boolean, + project_namespace_id bigint, + hidden boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE broadcast_messages_id_seq +CREATE SEQUENCE projects_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11724,179 +20505,161 @@ CREATE SEQUENCE broadcast_messages_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE broadcast_messages_id_seq OWNED BY broadcast_messages.id; +ALTER SEQUENCE projects_id_seq OWNED BY projects.id; -CREATE TABLE bulk_import_configurations ( +CREATE TABLE projects_sync_events ( id bigint NOT NULL, - bulk_import_id integer NOT NULL, - encrypted_url text, - encrypted_url_iv text, - encrypted_access_token text, - encrypted_access_token_iv text, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL + project_id bigint NOT NULL ); -CREATE SEQUENCE bulk_import_configurations_id_seq +CREATE SEQUENCE projects_sync_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_configurations_id_seq OWNED BY bulk_import_configurations.id; +ALTER SEQUENCE projects_sync_events_id_seq OWNED BY projects_sync_events.id; -CREATE TABLE bulk_import_entities ( +CREATE TABLE prometheus_alert_events ( id bigint NOT NULL, - bulk_import_id bigint NOT NULL, - parent_id bigint, - namespace_id bigint, - project_id bigint, - source_type smallint NOT NULL, - source_full_path text NOT NULL, - destination_name text NOT NULL, - destination_namespace text NOT NULL, - status smallint NOT NULL, - jid text, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)), - CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)), - CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)), - CONSTRAINT check_b834fff4d9 CHECK ((char_length(destination_namespace) <= 255)) + project_id integer NOT NULL, + prometheus_alert_id integer NOT NULL, + started_at timestamp with time zone NOT NULL, + ended_at timestamp with time zone, + status smallint, + payload_key character varying ); -CREATE SEQUENCE bulk_import_entities_id_seq +CREATE SEQUENCE prometheus_alert_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_entities_id_seq OWNED BY bulk_import_entities.id; +ALTER SEQUENCE prometheus_alert_events_id_seq OWNED BY prometheus_alert_events.id; -CREATE TABLE bulk_import_export_uploads ( - id bigint NOT NULL, - export_id bigint NOT NULL, +CREATE TABLE prometheus_alerts ( + id integer NOT NULL, + created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - export_file text, - CONSTRAINT check_5add76239d CHECK ((char_length(export_file) <= 255)) + threshold double precision NOT NULL, + operator integer NOT NULL, + environment_id integer NOT NULL, + project_id integer NOT NULL, + prometheus_metric_id integer NOT NULL, + runbook_url text, + CONSTRAINT check_cb76d7e629 CHECK ((char_length(runbook_url) <= 255)) ); -CREATE SEQUENCE bulk_import_export_uploads_id_seq +CREATE SEQUENCE prometheus_alerts_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_export_uploads_id_seq OWNED BY bulk_import_export_uploads.id; +ALTER SEQUENCE prometheus_alerts_id_seq OWNED BY prometheus_alerts.id; -CREATE TABLE bulk_import_exports ( - id bigint NOT NULL, - group_id bigint, - project_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status smallint DEFAULT 0 NOT NULL, - relation text NOT NULL, - jid text, - error text, - CONSTRAINT check_24cb010672 CHECK ((char_length(relation) <= 255)), - CONSTRAINT check_8f0f357334 CHECK ((char_length(error) <= 255)), - CONSTRAINT check_9ee6d14d33 CHECK ((char_length(jid) <= 255)) +CREATE TABLE prometheus_metrics ( + id integer NOT NULL, + project_id integer, + title character varying NOT NULL, + query character varying NOT NULL, + y_label character varying NOT NULL, + unit character varying NOT NULL, + legend character varying, + "group" integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + common boolean DEFAULT false NOT NULL, + identifier character varying, + dashboard_path text, + CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048)) ); -CREATE SEQUENCE bulk_import_exports_id_seq +CREATE SEQUENCE prometheus_metrics_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_exports_id_seq OWNED BY bulk_import_exports.id; +ALTER SEQUENCE prometheus_metrics_id_seq OWNED BY prometheus_metrics.id; -CREATE TABLE bulk_import_failures ( - id bigint NOT NULL, - bulk_import_entity_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - pipeline_class text NOT NULL, - exception_class text NOT NULL, - exception_message text NOT NULL, - correlation_id_value text, - pipeline_step text, - CONSTRAINT check_053d65c7a4 CHECK ((char_length(pipeline_class) <= 255)), - CONSTRAINT check_6eca8f972e CHECK ((char_length(exception_message) <= 255)), - CONSTRAINT check_721a422375 CHECK ((char_length(pipeline_step) <= 255)), - CONSTRAINT check_c7dba8398e CHECK ((char_length(exception_class) <= 255)), - CONSTRAINT check_e787285882 CHECK ((char_length(correlation_id_value) <= 255)) +CREATE TABLE protected_branch_merge_access_levels ( + id integer NOT NULL, + protected_branch_id integer NOT NULL, + access_level integer DEFAULT 40, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + group_id integer, + user_id integer ); -CREATE SEQUENCE bulk_import_failures_id_seq +CREATE SEQUENCE protected_branch_merge_access_levels_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_failures_id_seq OWNED BY bulk_import_failures.id; +ALTER SEQUENCE protected_branch_merge_access_levels_id_seq OWNED BY protected_branch_merge_access_levels.id; -CREATE TABLE bulk_import_trackers ( - id bigint NOT NULL, - bulk_import_entity_id bigint NOT NULL, - relation text NOT NULL, - next_page text, - has_next_page boolean DEFAULT false NOT NULL, - jid text, - stage smallint DEFAULT 0 NOT NULL, - status smallint DEFAULT 0 NOT NULL, - CONSTRAINT check_2d45cae629 CHECK ((char_length(relation) <= 255)), - CONSTRAINT check_40aeaa600b CHECK ((char_length(next_page) <= 255)), - CONSTRAINT check_603f91cb06 CHECK ((char_length(jid) <= 255)), - CONSTRAINT check_next_page_requirement CHECK (((has_next_page IS FALSE) OR (next_page IS NOT NULL))) +CREATE TABLE protected_branch_push_access_levels ( + id integer NOT NULL, + protected_branch_id integer NOT NULL, + access_level integer DEFAULT 40, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + group_id integer, + user_id integer, + deploy_key_id integer ); -CREATE SEQUENCE bulk_import_trackers_id_seq +CREATE SEQUENCE protected_branch_push_access_levels_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_import_trackers_id_seq OWNED BY bulk_import_trackers.id; +ALTER SEQUENCE protected_branch_push_access_levels_id_seq OWNED BY protected_branch_push_access_levels.id; -CREATE TABLE bulk_imports ( - id bigint NOT NULL, - user_id integer NOT NULL, - 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 +CREATE TABLE protected_branch_unprotect_access_levels ( + id integer NOT NULL, + protected_branch_id integer NOT NULL, + access_level integer DEFAULT 40, + user_id integer, + group_id integer ); -CREATE SEQUENCE bulk_imports_id_seq +CREATE SEQUENCE protected_branch_unprotect_access_levels_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE bulk_imports_id_seq OWNED BY bulk_imports.id; +ALTER SEQUENCE protected_branch_unprotect_access_levels_id_seq OWNED BY protected_branch_unprotect_access_levels.id; -CREATE TABLE chat_names ( +CREATE TABLE protected_branches ( id integer NOT NULL, - user_id integer NOT NULL, - service_id integer NOT NULL, - team_id character varying NOT NULL, - team_domain character varying, - chat_id character varying NOT NULL, - chat_name character varying, - last_used_at timestamp without time zone, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL + project_id integer NOT NULL, + name character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + code_owner_approval_required boolean DEFAULT false NOT NULL, + allow_force_push boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE chat_names_id_seq +CREATE SEQUENCE protected_branches_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11904,37 +20667,41 @@ CREATE SEQUENCE chat_names_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE chat_names_id_seq OWNED BY chat_names.id; +ALTER SEQUENCE protected_branches_id_seq OWNED BY protected_branches.id; -CREATE TABLE chat_teams ( - id integer NOT NULL, - namespace_id integer NOT NULL, - team_id character varying, - name character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL +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 chat_teams_id_seq - AS integer +CREATE SEQUENCE protected_environment_approval_rules_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE chat_teams_id_seq OWNED BY chat_teams.id; +ALTER SEQUENCE protected_environment_approval_rules_id_seq OWNED BY protected_environment_approval_rules.id; -CREATE TABLE ci_build_needs ( +CREATE TABLE protected_environment_deploy_access_levels ( 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, - build_id bigint NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + access_level integer DEFAULT 40, + protected_environment_id integer NOT NULL, + user_id integer, + group_id integer ); -CREATE SEQUENCE ci_build_needs_id_seq +CREATE SEQUENCE protected_environment_deploy_access_levels_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -11942,124 +20709,103 @@ CREATE SEQUENCE ci_build_needs_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_build_needs_id_seq OWNED BY ci_build_needs.id; +ALTER SEQUENCE protected_environment_deploy_access_levels_id_seq OWNED BY protected_environment_deploy_access_levels.id; -CREATE TABLE ci_build_pending_states ( - id bigint NOT NULL, +CREATE TABLE protected_environments ( + id integer NOT NULL, + project_id integer, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - build_id bigint NOT NULL, - state smallint, - failure_reason smallint, - trace_checksum bytea, - trace_bytesize bigint + name character varying NOT NULL, + group_id bigint, + 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 ci_build_pending_states_id_seq +CREATE SEQUENCE protected_environments_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_build_pending_states_id_seq OWNED BY ci_build_pending_states.id; +ALTER SEQUENCE protected_environments_id_seq OWNED BY protected_environments.id; -CREATE TABLE ci_build_report_results ( - build_id bigint NOT NULL, - project_id bigint NOT NULL, - data jsonb DEFAULT '{}'::jsonb NOT NULL +CREATE TABLE protected_tag_create_access_levels ( + id integer NOT NULL, + protected_tag_id integer NOT NULL, + access_level integer DEFAULT 40, + user_id integer, + group_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); -CREATE SEQUENCE ci_build_report_results_build_id_seq +CREATE SEQUENCE protected_tag_create_access_levels_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_build_report_results_build_id_seq OWNED BY ci_build_report_results.build_id; +ALTER SEQUENCE protected_tag_create_access_levels_id_seq OWNED BY protected_tag_create_access_levels.id; -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, - checksum bytea, - lock_version integer DEFAULT 0 NOT NULL, - build_id bigint NOT NULL +CREATE TABLE protected_tags ( + id integer NOT NULL, + project_id integer NOT NULL, + name character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); -CREATE SEQUENCE ci_build_trace_chunks_id_seq +CREATE SEQUENCE protected_tags_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_build_trace_chunks_id_seq OWNED BY ci_build_trace_chunks.id; - -CREATE TABLE ci_build_trace_metadata ( - build_id bigint NOT NULL, - trace_artifact_id bigint, - archival_attempts smallint DEFAULT 0 NOT NULL, - checksum bytea, - remote_checksum bytea, - last_archival_attempt_at timestamp with time zone, - archived_at timestamp with time zone -); +ALTER SEQUENCE protected_tags_id_seq OWNED BY protected_tags.id; -CREATE TABLE ci_builds ( - id integer NOT NULL, - status character varying, - finished_at timestamp without time zone, - trace text, - created_at timestamp without time zone, - updated_at timestamp without time zone, - started_at timestamp without time zone, - runner_id integer, - coverage double precision, - commit_id integer, - name character varying, - options text, - allow_failure boolean DEFAULT false NOT NULL, - stage character varying, - trigger_request_id integer, - stage_idx integer, - tag boolean, - ref character varying, - user_id integer, - type character varying, - target_url character varying, - description character varying, - project_id integer, - erased_by_id integer, - erased_at timestamp without time zone, - artifacts_expire_at timestamp without time zone, - environment character varying, - "when" character varying, - yaml_variables text, - queued_at timestamp without time zone, - token character varying, - lock_version integer DEFAULT 0, - 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, - token_encrypted character varying, - upstream_pipeline_id integer, - processed boolean, - resource_group_id bigint, - waiting_for_resource_at timestamp with time zone, - scheduling_type smallint, - id_convert_to_bigint bigint DEFAULT 0 NOT NULL, - stage_id bigint +CREATE TABLE push_event_payloads ( + commit_count bigint NOT NULL, + action smallint NOT NULL, + ref_type smallint NOT NULL, + commit_from bytea, + commit_to bytea, + ref text, + commit_title character varying(70), + ref_count integer, + event_id bigint NOT NULL ); -CREATE SEQUENCE ci_builds_id_seq +CREATE TABLE push_rules ( + id integer NOT NULL, + force_push_regex character varying, + delete_branch_regex character varying, + commit_message_regex character varying, + deny_delete_tag boolean, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + author_email_regex character varying, + member_check boolean DEFAULT false NOT NULL, + file_name_regex character varying, + is_sample boolean DEFAULT false, + max_file_size integer DEFAULT 0 NOT NULL, + prevent_secrets boolean DEFAULT false NOT NULL, + branch_name_regex character varying, + reject_unsigned_commits boolean, + commit_committer_check boolean, + regexp_uses_re2 boolean DEFAULT true, + commit_message_negative_regex character varying +); + +CREATE SEQUENCE push_rules_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12067,131 +20813,131 @@ CREATE SEQUENCE ci_builds_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id; +ALTER SEQUENCE push_rules_id_seq OWNED BY push_rules.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, - config_options jsonb, - config_variables jsonb, - interruptible boolean, - has_exposed_artifacts boolean, - environment_auto_stop_in character varying(255), - expanded_environment_name character varying(255), - secrets jsonb DEFAULT '{}'::jsonb NOT NULL, - build_id bigint NOT NULL, - id bigint NOT NULL +CREATE TABLE raw_usage_data ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + recorded_at timestamp with time zone NOT NULL, + sent_at timestamp with time zone, + payload jsonb NOT NULL, + version_usage_data_id_value bigint ); -CREATE SEQUENCE ci_builds_metadata_id_seq - AS integer +CREATE SEQUENCE raw_usage_data_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY ci_builds_metadata.id; +ALTER SEQUENCE raw_usage_data_id_seq OWNED BY raw_usage_data.id; -CREATE TABLE ci_builds_runner_session ( - id bigint NOT NULL, - url character varying NOT NULL, - certificate character varying, - "authorization" character varying, - build_id bigint NOT NULL +CREATE TABLE redirect_routes ( + id integer NOT NULL, + source_id integer NOT NULL, + source_type character varying NOT NULL, + path character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); -CREATE SEQUENCE ci_builds_runner_session_id_seq +CREATE SEQUENCE redirect_routes_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_builds_runner_session_id_seq OWNED BY ci_builds_runner_session.id; +ALTER SEQUENCE redirect_routes_id_seq OWNED BY redirect_routes.id; -CREATE TABLE ci_daily_build_group_report_results ( +CREATE TABLE related_epic_links ( id bigint NOT NULL, - date date NOT NULL, - project_id bigint NOT NULL, - last_pipeline_id bigint NOT NULL, - ref_path text NOT NULL, - group_name text NOT NULL, - data jsonb NOT NULL, - default_branch boolean DEFAULT false NOT NULL, - group_id bigint + 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 ci_daily_build_group_report_results_id_seq +CREATE SEQUENCE related_epic_links_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_daily_build_group_report_results_id_seq OWNED BY ci_daily_build_group_report_results.id; +ALTER SEQUENCE related_epic_links_id_seq OWNED BY related_epic_links.id; -CREATE TABLE ci_deleted_objects ( +CREATE TABLE release_links ( id bigint NOT NULL, - file_store smallint DEFAULT 1 NOT NULL, - pick_up_at timestamp with time zone DEFAULT now() NOT NULL, - store_dir text NOT NULL, - file text NOT NULL, - CONSTRAINT check_5e151d6912 CHECK ((char_length(store_dir) <= 1024)) + release_id integer NOT NULL, + url character varying NOT NULL, + name character varying NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + filepath character varying(128), + link_type smallint DEFAULT 0 ); -CREATE SEQUENCE ci_deleted_objects_id_seq +CREATE SEQUENCE release_links_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_deleted_objects_id_seq OWNED BY ci_deleted_objects.id; +ALTER SEQUENCE release_links_id_seq OWNED BY release_links.id; -CREATE TABLE ci_freeze_periods ( - id bigint NOT NULL, - project_id bigint NOT NULL, - freeze_start text NOT NULL, - freeze_end text NOT NULL, - cron_timezone text NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_4a7939e04e CHECK ((char_length(freeze_end) <= 998)), - CONSTRAINT check_a92607bd2b CHECK ((char_length(freeze_start) <= 998)), - CONSTRAINT check_b14055adc3 CHECK ((char_length(cron_timezone) <= 255)) +CREATE TABLE releases ( + id integer NOT NULL, + tag character varying, + description text, + project_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + description_html text, + cached_markdown_version integer, + author_id integer, + name character varying, + sha character varying, + released_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE ci_freeze_periods_id_seq +CREATE SEQUENCE releases_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_freeze_periods_id_seq OWNED BY ci_freeze_periods.id; +ALTER SEQUENCE releases_id_seq OWNED BY releases.id; -CREATE TABLE ci_group_variables ( +CREATE TABLE remote_mirrors ( id integer NOT NULL, - key character varying NOT NULL, - value text, - encrypted_value text, - encrypted_value_salt character varying, - encrypted_value_iv character varying, - group_id integer NOT NULL, - protected boolean DEFAULT false NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - masked boolean DEFAULT false NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL, - environment_scope text DEFAULT '*'::text NOT NULL, - CONSTRAINT check_dfe009485a CHECK ((char_length(environment_scope) <= 255)) + project_id integer, + url character varying, + enabled boolean DEFAULT false, + update_status character varying, + last_update_at timestamp without time zone, + last_successful_update_at timestamp without time zone, + last_update_started_at timestamp without time zone, + last_error character varying, + only_protected_branches boolean DEFAULT false NOT NULL, + remote_name character varying, + encrypted_credentials text, + encrypted_credentials_iv character varying, + encrypted_credentials_salt character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + error_notification_sent boolean, + keep_divergent_refs boolean ); -CREATE SEQUENCE ci_group_variables_id_seq +CREATE SEQUENCE remote_mirrors_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12199,236 +20945,250 @@ CREATE SEQUENCE ci_group_variables_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_group_variables_id_seq OWNED BY ci_group_variables.id; +ALTER SEQUENCE remote_mirrors_id_seq OWNED BY remote_mirrors.id; -CREATE TABLE ci_instance_variables ( +CREATE TABLE repository_languages ( + project_id integer NOT NULL, + programming_language_id integer NOT NULL, + share double precision NOT NULL +); + +CREATE TABLE required_code_owners_sections ( id bigint NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL, - masked boolean DEFAULT false, - protected boolean DEFAULT false, - key text NOT NULL, - encrypted_value text, - encrypted_value_iv text, - CONSTRAINT check_07a45a5bcb CHECK ((char_length(encrypted_value_iv) <= 255)), - CONSTRAINT check_5aede12208 CHECK ((char_length(key) <= 255)), - CONSTRAINT check_956afd70f1 CHECK ((char_length(encrypted_value) <= 13579)) + protected_branch_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_e58d53741e CHECK ((char_length(name) <= 1024)) ); -CREATE SEQUENCE ci_instance_variables_id_seq +CREATE SEQUENCE required_code_owners_sections_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_instance_variables_id_seq OWNED BY ci_instance_variables.id; +ALTER SEQUENCE required_code_owners_sections_id_seq OWNED BY required_code_owners_sections.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, +CREATE TABLE requirements ( + id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - expire_at timestamp with time zone, - file character varying, - file_store integer DEFAULT 1, - file_sha256 bytea, - file_format smallint, - file_location smallint, + project_id integer NOT NULL, + author_id integer, + iid integer NOT NULL, + cached_markdown_version integer, + state smallint DEFAULT 1 NOT NULL, + title character varying(255) NOT NULL, + title_html text, + description text, + description_html text, + issue_id bigint, + CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000)) +); + +CREATE SEQUENCE requirements_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE requirements_id_seq OWNED BY requirements.id; + +CREATE TABLE requirements_management_test_reports ( id bigint NOT NULL, - job_id bigint NOT NULL, - locked smallint DEFAULT 2, - CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)) + created_at timestamp with time zone NOT NULL, + requirement_id bigint, + author_id bigint, + state smallint NOT NULL, + build_id bigint, + issue_id bigint ); -CREATE SEQUENCE ci_job_artifacts_id_seq - AS integer +CREATE SEQUENCE requirements_management_test_reports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_job_artifacts_id_seq OWNED BY ci_job_artifacts.id; +ALTER SEQUENCE requirements_management_test_reports_id_seq OWNED BY requirements_management_test_reports.id; -CREATE TABLE ci_job_token_project_scope_links ( +CREATE TABLE resource_iteration_events ( id bigint NOT NULL, - source_project_id bigint NOT NULL, - target_project_id bigint NOT NULL, - added_by_id bigint, - created_at timestamp with time zone NOT NULL + user_id bigint NOT NULL, + issue_id bigint, + merge_request_id bigint, + iteration_id bigint, + created_at timestamp with time zone NOT NULL, + action smallint NOT NULL ); -CREATE SEQUENCE ci_job_token_project_scope_links_id_seq +CREATE SEQUENCE resource_iteration_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_job_token_project_scope_links_id_seq OWNED BY ci_job_token_project_scope_links.id; +ALTER SEQUENCE resource_iteration_events_id_seq OWNED BY resource_iteration_events.id; -CREATE TABLE ci_job_variables ( +CREATE TABLE resource_label_events ( id bigint NOT NULL, - key character varying NOT NULL, - encrypted_value text, - encrypted_value_iv character varying, - job_id bigint NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL, - source smallint DEFAULT 0 NOT NULL + action integer NOT NULL, + issue_id integer, + merge_request_id integer, + label_id integer, + user_id integer, + created_at timestamp with time zone NOT NULL, + cached_markdown_version integer, + reference text, + reference_html text, + epic_id integer ); -CREATE SEQUENCE ci_job_variables_id_seq +CREATE SEQUENCE resource_label_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_job_variables_id_seq OWNED BY ci_job_variables.id; +ALTER SEQUENCE resource_label_events_id_seq OWNED BY resource_label_events.id; -CREATE TABLE ci_minutes_additional_packs ( +CREATE TABLE resource_milestone_events ( id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - namespace_id bigint NOT NULL, - expires_at date, - number_of_minutes integer NOT NULL, - purchase_xid text, - CONSTRAINT check_d7ef254af0 CHECK ((char_length(purchase_xid) <= 32)) + user_id bigint, + issue_id bigint, + merge_request_id bigint, + milestone_id bigint, + action smallint NOT NULL, + state smallint NOT NULL, + created_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE ci_minutes_additional_packs_id_seq +CREATE SEQUENCE resource_milestone_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_minutes_additional_packs_id_seq OWNED BY ci_minutes_additional_packs.id; +ALTER SEQUENCE resource_milestone_events_id_seq OWNED BY resource_milestone_events.id; -CREATE TABLE ci_namespace_monthly_usages ( +CREATE TABLE resource_state_events ( id bigint NOT NULL, - namespace_id bigint NOT NULL, - date date NOT NULL, - additional_amount_available integer DEFAULT 0 NOT NULL, - amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, - notification_level smallint DEFAULT 100 NOT NULL, - CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) + user_id bigint, + issue_id bigint, + merge_request_id bigint, + created_at timestamp with time zone NOT NULL, + state smallint NOT NULL, + epic_id integer, + source_commit text, + close_after_error_tracking_resolve boolean DEFAULT false NOT NULL, + close_auto_resolve_prometheus_alert boolean DEFAULT false NOT NULL, + source_merge_request_id bigint, + CONSTRAINT check_f0bcfaa3a2 CHECK ((char_length(source_commit) <= 40)), + CONSTRAINT state_events_must_belong_to_issue_or_merge_request_or_epic CHECK ((((issue_id <> NULL::bigint) AND (merge_request_id IS NULL) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id <> NULL::bigint) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id IS NULL) AND (epic_id <> NULL::integer)))) ); -CREATE SEQUENCE ci_namespace_monthly_usages_id_seq +CREATE SEQUENCE resource_state_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id; +ALTER SEQUENCE resource_state_events_id_seq OWNED BY resource_state_events.id; -CREATE TABLE ci_pending_builds ( +CREATE TABLE resource_weight_events ( id bigint NOT NULL, - build_id bigint NOT NULL, - project_id bigint NOT NULL, - created_at timestamp with time zone DEFAULT now() NOT NULL, - protected boolean DEFAULT false NOT NULL, - instance_runners_enabled boolean DEFAULT false NOT NULL, - namespace_id bigint, - minutes_exceeded boolean DEFAULT false NOT NULL, - tag_ids integer[] DEFAULT '{}'::integer[] + user_id bigint, + issue_id bigint NOT NULL, + weight integer, + created_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE ci_pending_builds_id_seq +CREATE SEQUENCE resource_weight_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pending_builds_id_seq OWNED BY ci_pending_builds.id; +ALTER SEQUENCE resource_weight_events_id_seq OWNED BY resource_weight_events.id; -CREATE TABLE ci_pipeline_artifacts ( +CREATE TABLE reviews ( id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - pipeline_id bigint NOT NULL, - project_id bigint NOT NULL, - size integer NOT NULL, - file_store smallint DEFAULT 1 NOT NULL, - file_type smallint NOT NULL, - file_format smallint NOT NULL, - file text, - expire_at timestamp with time zone, - verification_started_at timestamp with time zone, - verification_retry_at timestamp with time zone, - verified_at timestamp with time zone, - verification_state smallint DEFAULT 0 NOT NULL, - verification_retry_count smallint, - verification_checksum bytea, - verification_failure text, - CONSTRAINT check_191b5850ec CHECK ((char_length(file) <= 255)), - CONSTRAINT check_abeeb71caf CHECK ((file IS NOT NULL)), - CONSTRAINT ci_pipeline_artifacts_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) + author_id integer, + merge_request_id integer NOT NULL, + project_id integer NOT NULL, + created_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE ci_pipeline_artifacts_id_seq +CREATE SEQUENCE reviews_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_artifacts_id_seq OWNED BY ci_pipeline_artifacts.id; +ALTER SEQUENCE reviews_id_seq OWNED BY reviews.id; -CREATE TABLE ci_pipeline_chat_data ( - id bigint NOT NULL, - pipeline_id integer NOT NULL, - chat_name_id integer NOT NULL, - response_url text NOT NULL +CREATE TABLE routes ( + id integer NOT NULL, + source_id integer NOT NULL, + source_type character varying NOT NULL, + path character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + name character varying, + namespace_id bigint ); -CREATE SEQUENCE ci_pipeline_chat_data_id_seq +CREATE SEQUENCE routes_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_chat_data_id_seq OWNED BY ci_pipeline_chat_data.id; +ALTER SEQUENCE routes_id_seq OWNED BY routes.id; -CREATE TABLE ci_pipeline_messages ( +CREATE TABLE saml_group_links ( id bigint NOT NULL, - severity smallint DEFAULT 0 NOT NULL, - pipeline_id integer NOT NULL, - content text NOT NULL, - CONSTRAINT check_58ca2981b2 CHECK ((char_length(content) <= 10000)) + access_level smallint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + saml_group_name text NOT NULL, + CONSTRAINT check_1b3fc49d1e CHECK ((char_length(saml_group_name) <= 255)) ); -CREATE SEQUENCE ci_pipeline_messages_id_seq +CREATE SEQUENCE saml_group_links_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id; +ALTER SEQUENCE saml_group_links_id_seq OWNED BY saml_group_links.id; -CREATE TABLE ci_pipeline_schedule_variables ( +CREATE TABLE saml_providers ( id integer NOT NULL, - key character varying NOT NULL, - value text, - encrypted_value text, - encrypted_value_salt character varying, - encrypted_value_iv character varying, - pipeline_schedule_id integer NOT NULL, - created_at timestamp with time zone, - updated_at timestamp with time zone, - variable_type smallint DEFAULT 1 NOT NULL + group_id integer NOT NULL, + enabled boolean NOT NULL, + certificate_fingerprint character varying NOT NULL, + sso_url character varying NOT NULL, + enforced_sso boolean DEFAULT false NOT NULL, + enforced_group_managed_accounts boolean DEFAULT false NOT NULL, + prohibited_outer_forks boolean DEFAULT true NOT NULL, + default_membership_role smallint DEFAULT 10 NOT NULL, + git_check_enforced boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq +CREATE SEQUENCE saml_providers_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12436,220 +21196,233 @@ CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_schedule_variables_id_seq OWNED BY ci_pipeline_schedule_variables.id; +ALTER SEQUENCE saml_providers_id_seq OWNED BY saml_providers.id; -CREATE TABLE ci_pipeline_schedules ( - id integer NOT NULL, - description character varying, - ref character varying, - cron character varying, - cron_timezone character varying, - next_run_at timestamp without time zone, - project_id integer, - owner_id integer, - active boolean DEFAULT true, - created_at timestamp without time zone, - updated_at timestamp without time zone +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 ci_pipeline_schedules_id_seq - AS integer +CREATE SEQUENCE saved_replies_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_schedules_id_seq OWNED BY ci_pipeline_schedules.id; +ALTER SEQUENCE saved_replies_id_seq OWNED BY saved_replies.id; -CREATE TABLE ci_pipeline_variables ( - id integer NOT NULL, - key character varying NOT NULL, - value text, - encrypted_value text, - encrypted_value_salt character varying, - encrypted_value_iv character varying, - pipeline_id integer NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL +CREATE TABLE scim_identities ( + id bigint NOT NULL, + group_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, + active boolean DEFAULT false, + extern_uid character varying(255) NOT NULL ); -CREATE SEQUENCE ci_pipeline_variables_id_seq - AS integer +CREATE SEQUENCE scim_identities_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipeline_variables_id_seq OWNED BY ci_pipeline_variables.id; +ALTER SEQUENCE scim_identities_id_seq OWNED BY scim_identities.id; -CREATE TABLE ci_pipelines ( +CREATE TABLE scim_oauth_access_tokens ( id integer NOT NULL, - ref character varying, - sha character varying, - before_sha character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - tag boolean DEFAULT false, - yaml_errors text, - committed_at timestamp without time zone, - project_id integer, - status character varying, - started_at timestamp without time zone, - finished_at timestamp without time zone, - duration integer, - user_id integer, - lock_version integer DEFAULT 0, - auto_canceled_by_id integer, - pipeline_schedule_id integer, - source integer, - protected boolean, - config_source integer, - failure_reason integer, - iid integer, - merge_request_id integer, - source_sha bytea, - target_sha bytea, - external_pull_request_id bigint, - ci_ref_id bigint, - locked smallint DEFAULT 1 NOT NULL -); - -CREATE TABLE ci_pipelines_config ( - pipeline_id bigint NOT NULL, - content text NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id integer NOT NULL, + token_encrypted character varying NOT NULL ); -CREATE SEQUENCE ci_pipelines_config_pipeline_id_seq +CREATE SEQUENCE scim_oauth_access_tokens_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipelines_config_pipeline_id_seq OWNED BY ci_pipelines_config.pipeline_id; +ALTER SEQUENCE scim_oauth_access_tokens_id_seq OWNED BY scim_oauth_access_tokens.id; + +CREATE TABLE security_findings ( + id bigint NOT NULL, + scan_id bigint NOT NULL, + scanner_id bigint NOT NULL, + severity smallint NOT NULL, + confidence smallint NOT NULL, + project_fingerprint text, + deduplicated boolean DEFAULT false NOT NULL, + uuid uuid, + overridden_uuid uuid, + CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)), + CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)) +); -CREATE SEQUENCE ci_pipelines_id_seq - AS integer +CREATE SEQUENCE security_findings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_pipelines_id_seq OWNED BY ci_pipelines.id; +ALTER SEQUENCE security_findings_id_seq OWNED BY security_findings.id; -CREATE TABLE ci_platform_metrics ( +CREATE TABLE security_orchestration_policy_configurations ( id bigint NOT NULL, - recorded_at timestamp with time zone NOT NULL, - platform_target text NOT NULL, - count integer NOT NULL, - CONSTRAINT check_f922abc32b CHECK ((char_length(platform_target) <= 255)), - CONSTRAINT ci_platform_metrics_check_count_positive CHECK ((count > 0)) + 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, + namespace_id bigint, + CONSTRAINT cop_configs_project_or_namespace_existence CHECK (((project_id IS NULL) <> (namespace_id IS NULL))) ); -CREATE SEQUENCE ci_platform_metrics_id_seq +COMMENT ON TABLE security_orchestration_policy_configurations IS '{"owner":"group::container security","description":"Configuration used to store relationship between project and security policy repository"}'; + +CREATE SEQUENCE security_orchestration_policy_configurations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_platform_metrics_id_seq OWNED BY ci_platform_metrics.id; +ALTER SEQUENCE security_orchestration_policy_configurations_id_seq OWNED BY security_orchestration_policy_configurations.id; -CREATE TABLE ci_project_monthly_usages ( +CREATE TABLE security_orchestration_policy_rule_schedules ( id bigint NOT NULL, - project_id bigint NOT NULL, - date date NOT NULL, - amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, - CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + next_run_at timestamp with time zone, + security_orchestration_policy_configuration_id bigint NOT NULL, + user_id bigint NOT NULL, + policy_index integer NOT NULL, + cron text NOT NULL, + rule_index integer DEFAULT 0 NOT NULL, + CONSTRAINT check_915825a76e CHECK ((char_length(cron) <= 255)) ); -CREATE SEQUENCE ci_project_monthly_usages_id_seq +COMMENT ON TABLE security_orchestration_policy_rule_schedules IS '{"owner":"group::container security","description":"Schedules used to store relationship between project and security policy repository"}'; + +CREATE SEQUENCE security_orchestration_policy_rule_schedules_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_project_monthly_usages_id_seq OWNED BY ci_project_monthly_usages.id; +ALTER SEQUENCE security_orchestration_policy_rule_schedules_id_seq OWNED BY security_orchestration_policy_rule_schedules.id; -CREATE TABLE ci_refs ( +CREATE TABLE security_scans ( id bigint NOT NULL, - project_id bigint NOT NULL, - lock_version integer DEFAULT 0 NOT NULL, - status smallint DEFAULT 0 NOT NULL, - ref_path text NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + build_id bigint NOT NULL, + scan_type smallint NOT NULL, + info jsonb DEFAULT '{}'::jsonb NOT NULL, + project_id bigint, + pipeline_id bigint, + latest boolean DEFAULT true NOT NULL, + status smallint DEFAULT 0 NOT NULL ); -CREATE SEQUENCE ci_refs_id_seq +CREATE SEQUENCE security_scans_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_refs_id_seq OWNED BY ci_refs.id; +ALTER SEQUENCE security_scans_id_seq OWNED BY security_scans.id; -CREATE TABLE ci_resource_groups ( +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, - project_id bigint NOT NULL, - key character varying(255) 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 ci_resource_groups_id_seq +CREATE SEQUENCE security_training_providers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_resource_groups_id_seq OWNED BY ci_resource_groups.id; +ALTER SEQUENCE security_training_providers_id_seq OWNED BY security_training_providers.id; -CREATE TABLE ci_resources ( +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, - resource_group_id bigint NOT NULL, - build_id bigint + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE ci_resources_id_seq +CREATE SEQUENCE security_trainings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_resources_id_seq OWNED BY ci_resources.id; +ALTER SEQUENCE security_trainings_id_seq OWNED BY security_trainings.id; -CREATE TABLE ci_runner_namespaces ( - id integer NOT NULL, - runner_id integer, - namespace_id integer +CREATE TABLE self_managed_prometheus_alert_events ( + id bigint NOT NULL, + project_id bigint NOT NULL, + environment_id bigint, + started_at timestamp with time zone NOT NULL, + ended_at timestamp with time zone, + status smallint NOT NULL, + title character varying(255) NOT NULL, + query_expression character varying(255), + payload_key character varying(255) NOT NULL ); -CREATE SEQUENCE ci_runner_namespaces_id_seq - AS integer +CREATE SEQUENCE self_managed_prometheus_alert_events_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_runner_namespaces_id_seq OWNED BY ci_runner_namespaces.id; +ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed_prometheus_alert_events.id; -CREATE TABLE ci_runner_projects ( +CREATE TABLE sent_notifications ( id integer NOT NULL, - runner_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - project_id integer + project_id integer, + noteable_type character varying, + noteable_id integer, + recipient_id integer, + commit_id character varying, + reply_key character varying NOT NULL, + line_code character varying, + note_type character varying, + "position" text, + in_reply_to_discussion_id character varying ); -CREATE SEQUENCE ci_runner_projects_id_seq +CREATE SEQUENCE sent_notifications_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12657,72 +21430,70 @@ CREATE SEQUENCE ci_runner_projects_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_runner_projects_id_seq OWNED BY ci_runner_projects.id; +ALTER SEQUENCE sent_notifications_id_seq OWNED BY sent_notifications.id; -CREATE TABLE ci_runners ( - id integer NOT NULL, - token character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - description character varying, - contacted_at timestamp without time zone, - active boolean DEFAULT true NOT NULL, - name character varying, - version character varying, - revision character varying, - platform character varying, - architecture character varying, - run_untagged boolean DEFAULT true NOT NULL, - locked boolean DEFAULT false NOT NULL, - access_level integer DEFAULT 0 NOT NULL, - maximum_timeout integer, - ip_address character varying, - runner_type smallint NOT NULL, - 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 +CREATE TABLE sentry_issues ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + sentry_issue_identifier bigint NOT NULL ); -CREATE SEQUENCE ci_runners_id_seq - AS integer +CREATE SEQUENCE sentry_issues_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_runners_id_seq OWNED BY ci_runners.id; +ALTER SEQUENCE sentry_issues_id_seq OWNED BY sentry_issues.id; -CREATE TABLE ci_running_builds ( - id bigint NOT NULL, - build_id bigint NOT NULL, +CREATE TABLE serverless_domain_cluster ( + pages_domain_id bigint NOT NULL, + clusters_applications_knative_id bigint NOT NULL, + creator_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + uuid character varying(14) NOT NULL, + encrypted_key text, + encrypted_key_iv character varying(255), + certificate text +); + +CREATE TABLE service_desk_settings ( project_id bigint NOT NULL, - runner_id bigint NOT NULL, - created_at timestamp with time zone DEFAULT now() NOT NULL, - runner_type smallint NOT NULL + issue_template_key character varying(255), + outgoing_name character varying(255), + project_key character varying(255), + file_template_project_id bigint ); -CREATE SEQUENCE ci_running_builds_id_seq +CREATE TABLE shards ( + id integer NOT NULL, + name character varying NOT NULL +); + +CREATE SEQUENCE shards_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_running_builds_id_seq OWNED BY ci_running_builds.id; +ALTER SEQUENCE shards_id_seq OWNED BY shards.id; -CREATE TABLE ci_sources_pipelines ( +CREATE TABLE slack_integrations ( 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 + service_id integer NOT NULL, + team_id character varying NOT NULL, + team_name character varying NOT NULL, + alias character varying NOT NULL, + user_id character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL ); -CREATE SEQUENCE ci_sources_pipelines_id_seq +CREATE SEQUENCE slack_integrations_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12730,71 +21501,107 @@ CREATE SEQUENCE ci_sources_pipelines_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_sources_pipelines_id_seq OWNED BY ci_sources_pipelines.id; +ALTER SEQUENCE slack_integrations_id_seq OWNED BY slack_integrations.id; -CREATE TABLE ci_sources_projects ( +CREATE TABLE smartcard_identities ( id bigint NOT NULL, - pipeline_id bigint NOT NULL, - source_project_id bigint NOT NULL + user_id integer NOT NULL, + subject character varying NOT NULL, + issuer character varying NOT NULL ); -CREATE SEQUENCE ci_sources_projects_id_seq +CREATE SEQUENCE smartcard_identities_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_sources_projects_id_seq OWNED BY ci_sources_projects.id; +ALTER SEQUENCE smartcard_identities_id_seq OWNED BY smartcard_identities.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, - updated_at timestamp without time zone, - name character varying, - status integer, - lock_version integer DEFAULT 0, - "position" integer, - id bigint NOT NULL +CREATE TABLE snippet_repositories ( + shard_id bigint NOT NULL, + snippet_id bigint NOT NULL, + disk_path character varying(80) NOT NULL, + verification_retry_count smallint, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_checksum bytea, + verification_failure text, + verification_state smallint DEFAULT 0 NOT NULL, + verification_started_at timestamp with time zone, + CONSTRAINT snippet_repositories_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE TABLE snippet_repository_storage_moves ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + snippet_id bigint NOT NULL, + state smallint DEFAULT 1 NOT NULL, + source_storage_name text NOT NULL, + destination_storage_name text NOT NULL, + CONSTRAINT snippet_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), + CONSTRAINT snippet_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) ); -CREATE SEQUENCE ci_stages_id_seq - AS integer +CREATE SEQUENCE snippet_repository_storage_moves_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_stages_id_seq OWNED BY ci_stages.id; +ALTER SEQUENCE snippet_repository_storage_moves_id_seq OWNED BY snippet_repository_storage_moves.id; -CREATE TABLE ci_subscriptions_projects ( +CREATE TABLE snippet_statistics ( + snippet_id bigint NOT NULL, + repository_size bigint DEFAULT 0 NOT NULL, + file_count bigint DEFAULT 0 NOT NULL, + commit_count bigint DEFAULT 0 NOT NULL +); + +CREATE TABLE snippet_user_mentions ( id bigint NOT NULL, - downstream_project_id bigint NOT NULL, - upstream_project_id bigint NOT NULL + snippet_id integer NOT NULL, + note_id integer, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] ); -CREATE SEQUENCE ci_subscriptions_projects_id_seq +CREATE SEQUENCE snippet_user_mentions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_subscriptions_projects_id_seq OWNED BY ci_subscriptions_projects.id; +ALTER SEQUENCE snippet_user_mentions_id_seq OWNED BY snippet_user_mentions.id; -CREATE TABLE ci_trigger_requests ( +CREATE TABLE snippets ( id integer NOT NULL, - trigger_id integer NOT NULL, - variables text, + title character varying, + content text, + author_id integer NOT NULL, + project_id integer, created_at timestamp without time zone, updated_at timestamp without time zone, - commit_id integer + file_name character varying, + type character varying, + visibility_level integer DEFAULT 0 NOT NULL, + title_html text, + content_html text, + cached_markdown_version integer, + description text, + description_html text, + encrypted_secret_token character varying(255), + encrypted_secret_token_iv character varying(255), + secret boolean DEFAULT false NOT NULL, + repository_read_only boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE ci_trigger_requests_id_seq +CREATE SEQUENCE snippets_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12802,20 +21609,19 @@ CREATE SEQUENCE ci_trigger_requests_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_trigger_requests_id_seq OWNED BY ci_trigger_requests.id; +ALTER SEQUENCE snippets_id_seq OWNED BY snippets.id; -CREATE TABLE ci_triggers ( +CREATE TABLE software_license_policies ( id integer NOT NULL, - token character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - project_id integer, - owner_id integer NOT NULL, - description character varying, - ref character varying + project_id integer NOT NULL, + software_license_id integer NOT NULL, + classification integer DEFAULT 0, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_8e8751b568 CHECK ((classification IS NOT NULL)) ); -CREATE SEQUENCE ci_triggers_id_seq +CREATE SEQUENCE software_license_policies_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12823,59 +21629,40 @@ CREATE SEQUENCE ci_triggers_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_triggers_id_seq OWNED BY ci_triggers.id; - -CREATE TABLE ci_unit_test_failures ( - id bigint NOT NULL, - failed_at timestamp with time zone NOT NULL, - unit_test_id bigint NOT NULL, - build_id bigint NOT NULL -); - -CREATE SEQUENCE ci_unit_test_failures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE ci_unit_test_failures_id_seq OWNED BY ci_unit_test_failures.id; +ALTER SEQUENCE software_license_policies_id_seq OWNED BY software_license_policies.id; -CREATE TABLE ci_unit_tests ( - id bigint NOT NULL, - project_id bigint NOT NULL, - key_hash text NOT NULL, - name text NOT NULL, - suite_name text NOT NULL, - CONSTRAINT check_248fae1a3b CHECK ((char_length(name) <= 255)), - CONSTRAINT check_b288215ffe CHECK ((char_length(key_hash) <= 64)), - CONSTRAINT check_c2d57b3c49 CHECK ((char_length(suite_name) <= 255)) +CREATE TABLE software_licenses ( + id integer NOT NULL, + name character varying NOT NULL, + spdx_identifier character varying(255) ); -CREATE SEQUENCE ci_unit_tests_id_seq +CREATE SEQUENCE software_licenses_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_unit_tests_id_seq OWNED BY ci_unit_tests.id; +ALTER SEQUENCE software_licenses_id_seq OWNED BY software_licenses.id; -CREATE TABLE ci_variables ( +CREATE TABLE spam_logs ( id integer NOT NULL, - key character varying NOT NULL, - value text, - encrypted_value text, - encrypted_value_salt character varying, - encrypted_value_iv character varying, - project_id integer NOT NULL, - protected boolean DEFAULT false NOT NULL, - environment_scope character varying DEFAULT '*'::character varying NOT NULL, - masked boolean DEFAULT false NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL + user_id integer, + source_ip character varying, + user_agent character varying, + via_api boolean, + noteable_type character varying, + title character varying, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + submitted_as_ham boolean DEFAULT false NOT NULL, + recaptcha_verified boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE ci_variables_id_seq +CREATE SEQUENCE spam_logs_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -12883,205 +21670,170 @@ CREATE SEQUENCE ci_variables_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_variables_id_seq OWNED BY ci_variables.id; +ALTER SEQUENCE spam_logs_id_seq OWNED BY spam_logs.id; -CREATE TABLE cluster_agent_tokens ( +CREATE TABLE sprints ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - agent_id bigint NOT NULL, - token_encrypted text NOT NULL, - created_by_user_id bigint, + start_date date, + due_date date, + project_id bigint, + group_id bigint, + iid integer NOT NULL, + cached_markdown_version integer, + title text, + title_html text, description text, - name text, - last_used_at timestamp with time zone, - CONSTRAINT check_0fb634d04d CHECK ((name IS NOT NULL)), - CONSTRAINT check_2b79dbb315 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_4e4ec5070a CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255)) + 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)) ); -CREATE SEQUENCE cluster_agent_tokens_id_seq +CREATE SEQUENCE sprints_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_agent_tokens_id_seq OWNED BY cluster_agent_tokens.id; +ALTER SEQUENCE sprints_id_seq OWNED BY sprints.id; -CREATE TABLE cluster_agents ( +CREATE TABLE status_check_responses ( id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - name text NOT NULL, - created_by_user_id bigint, - CONSTRAINT check_3498369510 CHECK ((char_length(name) <= 255)) -); - -CREATE SEQUENCE cluster_agents_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE cluster_agents_id_seq OWNED BY cluster_agents.id; - -CREATE TABLE cluster_groups ( - id integer NOT NULL, - cluster_id integer NOT NULL, - group_id integer NOT NULL + merge_request_id bigint NOT NULL, + external_approval_rule_id bigint, + sha bytea NOT NULL, + external_status_check_id bigint NOT NULL, + status smallint DEFAULT 0 NOT NULL ); -CREATE SEQUENCE cluster_groups_id_seq - AS integer +CREATE SEQUENCE status_check_responses_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_groups_id_seq OWNED BY cluster_groups.id; +ALTER SEQUENCE status_check_responses_id_seq OWNED BY status_check_responses.id; -CREATE TABLE cluster_platforms_kubernetes ( - id integer NOT NULL, - cluster_id integer NOT NULL, +CREATE TABLE status_page_published_incidents ( + id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - api_url text, - ca_cert text, - namespace character varying, - username character varying, - encrypted_password text, - encrypted_password_iv character varying, - encrypted_token text, - encrypted_token_iv character varying, - authorization_type smallint + issue_id bigint NOT NULL ); -CREATE SEQUENCE cluster_platforms_kubernetes_id_seq - AS integer +CREATE SEQUENCE status_page_published_incidents_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_platforms_kubernetes_id_seq OWNED BY cluster_platforms_kubernetes.id; +ALTER SEQUENCE status_page_published_incidents_id_seq OWNED BY status_page_published_incidents.id; -CREATE TABLE cluster_projects ( - id integer NOT NULL, - project_id integer NOT NULL, - cluster_id integer NOT NULL, +CREATE TABLE status_page_settings ( + project_id bigint 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, + enabled boolean DEFAULT false NOT NULL, + aws_s3_bucket_name character varying(63) NOT NULL, + aws_region character varying(255) NOT NULL, + aws_access_key character varying(255) NOT NULL, + encrypted_aws_secret_key character varying(255) NOT NULL, + encrypted_aws_secret_key_iv character varying(255) NOT NULL, + status_page_url text, + CONSTRAINT check_75a79cd992 CHECK ((char_length(status_page_url) <= 1024)) ); -CREATE SEQUENCE cluster_projects_id_seq - AS integer +CREATE SEQUENCE status_page_settings_project_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_projects_id_seq OWNED BY cluster_projects.id; +ALTER SEQUENCE status_page_settings_project_id_seq OWNED BY status_page_settings.project_id; -CREATE TABLE cluster_providers_aws ( - id bigint NOT NULL, - cluster_id bigint NOT NULL, - num_nodes integer NOT NULL, - status integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - key_name character varying(255) NOT NULL, - role_arn character varying(2048) NOT NULL, - region character varying(255) NOT NULL, - vpc_id character varying(255) NOT NULL, - subnet_ids character varying(255)[] DEFAULT '{}'::character varying[] NOT NULL, - security_group_id character varying(255) NOT NULL, - instance_type character varying(255) NOT NULL, - access_key_id character varying(255), - encrypted_secret_access_key_iv character varying(255), - encrypted_secret_access_key text, - session_token text, - status_reason text, - kubernetes_version text DEFAULT '1.14'::text NOT NULL, - CONSTRAINT check_f1f42cd85e CHECK ((char_length(kubernetes_version) <= 30)) +CREATE TABLE subscriptions ( + id integer NOT NULL, + user_id integer, + subscribable_type character varying, + subscribable_id integer, + subscribed boolean, + created_at timestamp without time zone, + updated_at timestamp without time zone, + project_id integer ); -CREATE SEQUENCE cluster_providers_aws_id_seq +CREATE SEQUENCE subscriptions_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_providers_aws_id_seq OWNED BY cluster_providers_aws.id; +ALTER SEQUENCE subscriptions_id_seq OWNED BY subscriptions.id; -CREATE TABLE cluster_providers_gcp ( - id integer NOT NULL, - cluster_id integer NOT NULL, - status integer, - num_nodes integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status_reason text, - gcp_project_id character varying NOT NULL, - zone character varying NOT NULL, - machine_type character varying, - operation_id character varying, - endpoint character varying, - encrypted_access_token text, - encrypted_access_token_iv character varying, - legacy_abac boolean DEFAULT false NOT NULL, - cloud_run boolean DEFAULT false NOT NULL +CREATE TABLE suggestions ( + id bigint NOT NULL, + note_id integer NOT NULL, + relative_order smallint NOT NULL, + applied boolean DEFAULT false NOT NULL, + commit_id character varying, + from_content text NOT NULL, + to_content text NOT NULL, + lines_above integer DEFAULT 0 NOT NULL, + lines_below integer DEFAULT 0 NOT NULL, + outdated boolean DEFAULT false NOT NULL ); -CREATE SEQUENCE cluster_providers_gcp_id_seq - AS integer +CREATE SEQUENCE suggestions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE cluster_providers_gcp_id_seq OWNED BY cluster_providers_gcp.id; +ALTER SEQUENCE suggestions_id_seq OWNED BY suggestions.id; -CREATE TABLE clusters ( +CREATE TABLE system_note_metadata ( id integer NOT NULL, - user_id integer, - provider_type integer, - platform_type integer, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - enabled boolean DEFAULT true, - name character varying NOT NULL, - environment_scope character varying DEFAULT '*'::character varying NOT NULL, - cluster_type smallint DEFAULT 3 NOT NULL, - domain character varying, - managed boolean DEFAULT true NOT NULL, - namespace_per_environment boolean DEFAULT true NOT NULL, - cleanup_status smallint DEFAULT 1 NOT NULL, - cleanup_status_reason text, - management_project_id integer, - helm_major_version integer DEFAULT 3 NOT NULL + note_id integer NOT NULL, + commit_count integer, + action character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + description_version_id bigint ); -CREATE TABLE clusters_applications_cert_managers ( - id integer NOT NULL, - cluster_id integer NOT NULL, - status integer NOT NULL, - version character varying NOT NULL, - email character varying NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status_reason text +CREATE SEQUENCE system_note_metadata_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE system_note_metadata_id_seq OWNED BY system_note_metadata.id; + +CREATE TABLE taggings ( + tag_id integer, + taggable_type character varying, + tagger_id integer, + tagger_type character varying, + context character varying, + created_at timestamp without time zone, + id bigint NOT NULL, + taggable_id bigint ); -CREATE SEQUENCE clusters_applications_cert_managers_id_seq +CREATE SEQUENCE taggings_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13089,103 +21841,113 @@ CREATE SEQUENCE clusters_applications_cert_managers_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_cert_managers_id_seq OWNED BY clusters_applications_cert_managers.id; +ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id; -CREATE TABLE clusters_applications_cilium ( - id bigint NOT NULL, - cluster_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status integer NOT NULL, - status_reason text +CREATE TABLE tags ( + id integer NOT NULL, + name character varying, + taggings_count integer DEFAULT 0 ); -CREATE SEQUENCE clusters_applications_cilium_id_seq +CREATE SEQUENCE tags_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_cilium_id_seq OWNED BY clusters_applications_cilium.id; +ALTER SEQUENCE tags_id_seq OWNED BY tags.id; -CREATE TABLE clusters_applications_crossplane ( - id bigint NOT NULL, +CREATE TABLE term_agreements ( + id integer NOT NULL, + term_id integer NOT NULL, + user_id integer NOT NULL, + accepted boolean DEFAULT false NOT NULL, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - cluster_id bigint NOT NULL, - status integer NOT NULL, - version character varying(255) NOT NULL, - stack character varying(255) NOT NULL, - status_reason text + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE clusters_applications_crossplane_id_seq +CREATE SEQUENCE term_agreements_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_crossplane_id_seq OWNED BY clusters_applications_crossplane.id; +ALTER SEQUENCE term_agreements_id_seq OWNED BY term_agreements.id; -CREATE TABLE clusters_applications_elastic_stacks ( +CREATE TABLE terraform_state_versions ( id bigint NOT NULL, + terraform_state_id bigint NOT NULL, + created_by_user_id bigint, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - cluster_id bigint NOT NULL, - status integer NOT NULL, - version character varying(255) NOT NULL, - status_reason text + version integer NOT NULL, + file_store smallint NOT NULL, + file text NOT NULL, + verification_retry_count smallint, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_checksum bytea, + verification_failure text, + ci_build_id bigint, + verification_started_at timestamp with time zone, + verification_state smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_0824bb7bbd CHECK ((char_length(file) <= 255)), + CONSTRAINT tf_state_versions_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) ); -CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq +CREATE SEQUENCE terraform_state_versions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id; +ALTER SEQUENCE terraform_state_versions_id_seq OWNED BY terraform_state_versions.id; -CREATE TABLE clusters_applications_helm ( - id integer NOT NULL, - cluster_id integer NOT NULL, +CREATE TABLE terraform_states ( + 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, - status integer NOT NULL, - version character varying NOT NULL, - status_reason text, - encrypted_ca_key text, - encrypted_ca_key_iv text, - ca_cert text + file_store smallint, + file character varying(255), + lock_xid character varying(255), + locked_at timestamp with time zone, + locked_by_user_id bigint, + uuid character varying(32) NOT NULL, + name character varying(255) NOT NULL, + versioning_enabled boolean DEFAULT true NOT NULL ); -CREATE SEQUENCE clusters_applications_helm_id_seq - AS integer +CREATE SEQUENCE terraform_states_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_helm_id_seq OWNED BY clusters_applications_helm.id; +ALTER SEQUENCE terraform_states_id_seq OWNED BY terraform_states.id; -CREATE TABLE clusters_applications_ingress ( +CREATE TABLE timelogs ( id integer NOT NULL, - cluster_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status integer NOT NULL, - ingress_type integer NOT NULL, - version character varying NOT NULL, - cluster_ip character varying, - status_reason text, - external_ip character varying, - external_hostname character varying + time_spent integer NOT NULL, + user_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + issue_id integer, + merge_request_id integer, + spent_at timestamp with time zone DEFAULT now(), + note_id integer, + project_id integer, + summary text, + CONSTRAINT check_271d321699 CHECK ((char_length(summary) <= 255)) ); -CREATE SEQUENCE clusters_applications_ingress_id_seq +CREATE SEQUENCE timelogs_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13193,21 +21955,26 @@ CREATE SEQUENCE clusters_applications_ingress_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_ingress_id_seq OWNED BY clusters_applications_ingress.id; +ALTER SEQUENCE timelogs_id_seq OWNED BY timelogs.id; -CREATE TABLE clusters_applications_jupyter ( +CREATE TABLE todos ( id integer NOT NULL, - cluster_id integer NOT NULL, - oauth_application_id integer, - status integer NOT NULL, - version character varying NOT NULL, - hostname character varying, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status_reason text + user_id integer NOT NULL, + project_id integer, + target_type character varying NOT NULL, + target_id integer, + author_id integer NOT NULL, + action integer NOT NULL, + state character varying NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone, + note_id integer, + commit_id character varying, + group_id integer, + resolved_by_action smallint ); -CREATE SEQUENCE clusters_applications_jupyter_id_seq +CREATE SEQUENCE todos_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13215,68 +21982,53 @@ CREATE SEQUENCE clusters_applications_jupyter_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_jupyter_id_seq OWNED BY clusters_applications_jupyter.id; +ALTER SEQUENCE todos_id_seq OWNED BY todos.id; -CREATE TABLE clusters_applications_knative ( - id integer NOT NULL, - cluster_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status integer NOT NULL, - version character varying NOT NULL, - hostname character varying, - status_reason text, - external_ip character varying, - external_hostname character varying +CREATE TABLE token_with_ivs ( + id bigint NOT NULL, + hashed_token bytea NOT NULL, + hashed_plaintext_token bytea NOT NULL, + iv bytea NOT NULL ); -CREATE SEQUENCE clusters_applications_knative_id_seq - AS integer +CREATE SEQUENCE token_with_ivs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_knative_id_seq OWNED BY clusters_applications_knative.id; +ALTER SEQUENCE token_with_ivs_id_seq OWNED BY token_with_ivs.id; -CREATE TABLE clusters_applications_prometheus ( - id integer NOT NULL, - cluster_id integer NOT NULL, - status integer NOT NULL, - version character varying NOT NULL, - status_reason text, +CREATE TABLE topics ( + id bigint NOT NULL, + name text NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - encrypted_alert_manager_token character varying, - encrypted_alert_manager_token_iv character varying, - last_update_started_at timestamp with time zone, - healthy boolean + 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)) ); -CREATE SEQUENCE clusters_applications_prometheus_id_seq - AS integer +CREATE SEQUENCE topics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_prometheus_id_seq OWNED BY clusters_applications_prometheus.id; +ALTER SEQUENCE topics_id_seq OWNED BY topics.id; -CREATE TABLE clusters_applications_runners ( +CREATE TABLE trending_projects ( id integer NOT NULL, - cluster_id integer NOT NULL, - runner_id integer, - status integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - version character varying NOT NULL, - status_reason text, - privileged boolean DEFAULT true NOT NULL + project_id integer NOT NULL ); -CREATE SEQUENCE clusters_applications_runners_id_seq +CREATE SEQUENCE trending_projects_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13284,9 +22036,21 @@ CREATE SEQUENCE clusters_applications_runners_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_applications_runners_id_seq OWNED BY clusters_applications_runners.id; +ALTER SEQUENCE trending_projects_id_seq OWNED BY trending_projects.id; -CREATE SEQUENCE clusters_id_seq +CREATE TABLE u2f_registrations ( + id integer NOT NULL, + certificate text, + key_handle character varying, + public_key character varying, + counter integer, + user_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + name character varying +); + +CREATE SEQUENCE u2f_registrations_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13294,118 +22058,84 @@ CREATE SEQUENCE clusters_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_id_seq OWNED BY clusters.id; - -CREATE TABLE clusters_integration_elasticstack ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - cluster_id bigint NOT NULL, - enabled boolean DEFAULT false NOT NULL, - chart_version text, - CONSTRAINT check_f8d671ce04 CHECK ((char_length(chart_version) <= 10)) -); - -CREATE TABLE clusters_integration_prometheus ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - cluster_id bigint NOT NULL, - enabled boolean DEFAULT false NOT NULL, - encrypted_alert_manager_token text, - encrypted_alert_manager_token_iv text -); +ALTER SEQUENCE u2f_registrations_id_seq OWNED BY u2f_registrations.id; -CREATE TABLE clusters_kubernetes_namespaces ( +CREATE TABLE upcoming_reconciliations ( id bigint NOT NULL, - cluster_id integer NOT NULL, - project_id integer, - cluster_project_id integer, + namespace_id bigint, + next_reconciliation_date date NOT NULL, + display_alert_from date NOT NULL, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - encrypted_service_account_token_iv character varying, - namespace character varying NOT NULL, - service_account_name character varying, - encrypted_service_account_token text, - environment_id bigint + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE clusters_kubernetes_namespaces_id_seq +CREATE SEQUENCE upcoming_reconciliations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE clusters_kubernetes_namespaces_id_seq OWNED BY clusters_kubernetes_namespaces.id; +ALTER SEQUENCE upcoming_reconciliations_id_seq OWNED BY upcoming_reconciliations.id; -CREATE TABLE commit_user_mentions ( - id bigint NOT NULL, - note_id integer NOT NULL, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[], - commit_id character varying, - CONSTRAINT check_724d773807 CHECK ((commit_id IS NOT NULL)) +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 commit_user_mentions_id_seq +CREATE SEQUENCE upload_states_upload_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE commit_user_mentions_id_seq OWNED BY commit_user_mentions.id; +ALTER SEQUENCE upload_states_upload_id_seq OWNED BY upload_states.upload_id; -CREATE TABLE compliance_management_frameworks ( - id bigint NOT NULL, - name text NOT NULL, - description text NOT NULL, - color text NOT NULL, - namespace_id integer NOT NULL, - regulated boolean DEFAULT true NOT NULL, - pipeline_configuration_full_path text, - CONSTRAINT check_08cd34b2c2 CHECK ((char_length(color) <= 10)), - CONSTRAINT check_1617e0b87e CHECK ((char_length(description) <= 255)), - CONSTRAINT check_ab00bc2193 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_e7a9972435 CHECK ((char_length(pipeline_configuration_full_path) <= 255)) +CREATE TABLE uploads ( + id integer NOT NULL, + size bigint NOT NULL, + path character varying(511) NOT NULL, + checksum character varying(64), + model_type character varying, + model_id integer, + uploader character varying NOT NULL, + created_at timestamp without time zone NOT NULL, + store integer DEFAULT 1, + mount_point character varying, + secret character varying, + CONSTRAINT check_5e9547379c CHECK ((store IS NOT NULL)) ); -CREATE SEQUENCE compliance_management_frameworks_id_seq +CREATE SEQUENCE uploads_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE compliance_management_frameworks_id_seq OWNED BY compliance_management_frameworks.id; - -CREATE TABLE container_expiration_policies ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - next_run_at timestamp with time zone, - project_id bigint NOT NULL, - name_regex character varying(255) DEFAULT '.*'::character varying, - cadence character varying(12) DEFAULT '1d'::character varying NOT NULL, - older_than character varying(12) DEFAULT '90d'::character varying, - keep_n integer DEFAULT 10, - enabled boolean DEFAULT false NOT NULL, - name_regex_keep text, - CONSTRAINT container_expiration_policies_name_regex_keep CHECK ((char_length(name_regex_keep) <= 255)) -); +ALTER SEQUENCE uploads_id_seq OWNED BY uploads.id; -CREATE TABLE container_repositories ( +CREATE TABLE user_agent_details ( id integer NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL, + user_agent character varying NOT NULL, + ip_address character varying NOT NULL, + subject_id integer NOT NULL, + subject_type character varying NOT NULL, + submitted boolean DEFAULT false NOT NULL, created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - 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 + updated_at timestamp without time zone NOT NULL ); -CREATE SEQUENCE container_repositories_id_seq +CREATE SEQUENCE user_agent_details_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13413,45 +22143,16 @@ CREATE SEQUENCE container_repositories_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE container_repositories_id_seq OWNED BY container_repositories.id; +ALTER SEQUENCE user_agent_details_id_seq OWNED BY user_agent_details.id; -CREATE TABLE conversational_development_index_metrics ( +CREATE TABLE user_callouts ( id integer NOT NULL, - leader_issues double precision NOT NULL, - instance_issues double precision NOT NULL, - leader_notes double precision NOT NULL, - instance_notes double precision NOT NULL, - leader_milestones double precision NOT NULL, - instance_milestones double precision NOT NULL, - leader_boards double precision NOT NULL, - instance_boards double precision NOT NULL, - leader_merge_requests double precision NOT NULL, - instance_merge_requests double precision NOT NULL, - leader_ci_pipelines double precision NOT NULL, - instance_ci_pipelines double precision NOT NULL, - leader_environments double precision NOT NULL, - instance_environments double precision NOT NULL, - leader_deployments double precision NOT NULL, - instance_deployments double precision NOT NULL, - leader_projects_prometheus_active double precision NOT NULL, - instance_projects_prometheus_active double precision NOT NULL, - leader_service_desk_issues double precision NOT NULL, - instance_service_desk_issues double precision NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - percentage_boards double precision DEFAULT 0.0 NOT NULL, - percentage_ci_pipelines double precision DEFAULT 0.0 NOT NULL, - percentage_deployments double precision DEFAULT 0.0 NOT NULL, - percentage_environments double precision DEFAULT 0.0 NOT NULL, - percentage_issues double precision DEFAULT 0.0 NOT NULL, - percentage_merge_requests double precision DEFAULT 0.0 NOT NULL, - percentage_milestones double precision DEFAULT 0.0 NOT NULL, - percentage_notes double precision DEFAULT 0.0 NOT NULL, - percentage_projects_prometheus_active double precision DEFAULT 0.0 NOT NULL, - percentage_service_desk_issues double precision DEFAULT 0.0 NOT NULL + feature_name integer NOT NULL, + user_id integer NOT NULL, + dismissed_at timestamp with time zone ); -CREATE SEQUENCE conversational_development_index_metrics_id_seq +CREATE SEQUENCE user_callouts_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13459,434 +22160,495 @@ CREATE SEQUENCE conversational_development_index_metrics_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE conversational_development_index_metrics_id_seq OWNED BY conversational_development_index_metrics.id; +ALTER SEQUENCE user_callouts_id_seq OWNED BY user_callouts.id; -CREATE TABLE csv_issue_imports ( +CREATE TABLE user_canonical_emails ( id bigint NOT NULL, - project_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 + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL, + canonical_email character varying NOT NULL ); -CREATE SEQUENCE csv_issue_imports_id_seq +CREATE SEQUENCE user_canonical_emails_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE csv_issue_imports_id_seq OWNED BY csv_issue_imports.id; +ALTER SEQUENCE user_canonical_emails_id_seq OWNED BY user_canonical_emails.id; -CREATE TABLE custom_emoji ( - id bigint NOT NULL, - namespace_id bigint NOT NULL, +CREATE TABLE user_credit_card_validations ( + user_id bigint 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 ( + id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - name text NOT NULL, - file text NOT NULL, - external boolean DEFAULT true NOT NULL, - creator_id bigint NOT NULL, - CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)), - CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255)) + user_id integer NOT NULL, + key character varying NOT NULL, + value character varying NOT NULL +); + +CREATE SEQUENCE user_custom_attributes_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE user_custom_attributes_id_seq OWNED BY user_custom_attributes.id; + +CREATE TABLE user_details ( + user_id bigint NOT NULL, + job_title character varying(200) DEFAULT ''::character varying NOT NULL, + bio character varying(255) DEFAULT ''::character varying NOT NULL, + webauthn_xid text, + provisioned_by_group_id bigint, + other_role text, + 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)) ); -CREATE SEQUENCE custom_emoji_id_seq +COMMENT ON COLUMN user_details.phone IS 'JiHu-specific column'; + +CREATE SEQUENCE user_details_user_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE custom_emoji_id_seq OWNED BY custom_emoji.id; +ALTER SEQUENCE user_details_user_id_seq OWNED BY user_details.user_id; -CREATE TABLE customer_relations_contacts ( +CREATE TABLE user_follow_users ( + follower_id integer NOT NULL, + followee_id integer NOT NULL +); + +CREATE TABLE user_group_callouts ( id bigint NOT NULL, + user_id bigint NOT NULL, group_id bigint NOT NULL, - organization_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - state smallint DEFAULT 1 NOT NULL, - phone text, - first_name text NOT NULL, - last_name text NOT NULL, - email text, - description text, - CONSTRAINT check_1195f4c929 CHECK ((char_length(first_name) <= 255)), - CONSTRAINT check_40c70da037 CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_cd2d67c484 CHECK ((char_length(last_name) <= 255)), - CONSTRAINT check_f4b7f78c89 CHECK ((char_length(phone) <= 32)), - CONSTRAINT check_fc0adabf60 CHECK ((char_length(email) <= 255)) + feature_name smallint NOT NULL, + dismissed_at timestamp with time zone ); -CREATE SEQUENCE customer_relations_contacts_id_seq +CREATE SEQUENCE user_group_callouts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE customer_relations_contacts_id_seq OWNED BY customer_relations_contacts.id; +ALTER SEQUENCE user_group_callouts_id_seq OWNED BY user_group_callouts.id; -CREATE TABLE customer_relations_organizations ( +CREATE TABLE user_highest_roles ( + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL, + highest_access_level integer +); + +CREATE TABLE user_interacted_projects ( + user_id integer NOT NULL, + project_id integer NOT NULL +); + +CREATE TABLE user_permission_export_uploads ( id bigint NOT NULL, - group_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - state smallint DEFAULT 1 NOT NULL, - default_rate numeric(18,2), - name text NOT NULL, - description text, - CONSTRAINT check_2ba9ef1c4c CHECK ((char_length(name) <= 255)), - CONSTRAINT check_e476b6058e CHECK ((char_length(description) <= 1024)) + user_id bigint NOT NULL, + file_store integer, + status smallint DEFAULT 0 NOT NULL, + file text, + CONSTRAINT check_1956806648 CHECK ((char_length(file) <= 255)) ); -CREATE SEQUENCE customer_relations_organizations_id_seq +CREATE SEQUENCE user_permission_export_uploads_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE customer_relations_organizations_id_seq OWNED BY customer_relations_organizations.id; +ALTER SEQUENCE user_permission_export_uploads_id_seq OWNED BY user_permission_export_uploads.id; -CREATE TABLE dast_profile_schedules ( - id bigint NOT NULL, - project_id bigint NOT NULL, - dast_profile_id bigint NOT NULL, - user_id bigint, - next_run_at timestamp with time zone NOT NULL, +CREATE TABLE user_preferences ( + id integer NOT NULL, + user_id integer NOT NULL, + issue_notes_filter smallint DEFAULT 0 NOT NULL, + merge_request_notes_filter smallint DEFAULT 0 NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - active boolean DEFAULT true NOT NULL, - cron text NOT NULL, - cadence jsonb DEFAULT '{}'::jsonb NOT NULL, - timezone text NOT NULL, - starts_at timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT check_86531ea73f CHECK ((char_length(cron) <= 255)), - CONSTRAINT check_be4d1c3af1 CHECK ((char_length(timezone) <= 255)) + first_day_of_week integer, + issues_sort character varying, + merge_requests_sort character varying, + timezone character varying, + time_display_relative boolean, + time_format_in_24h boolean, + epic_notes_filter smallint DEFAULT 0 NOT NULL, + epics_sort character varying, + roadmap_epics_state integer, + roadmaps_sort character varying, + projects_sort character varying(64), + show_whitespace_in_diffs boolean DEFAULT true NOT NULL, + setup_for_company boolean, + sourcegraph_enabled boolean, + render_whitespace_in_code boolean, + tab_width smallint, + experience_level smallint, + view_diffs_file_by_file boolean DEFAULT false NOT NULL, + gitpod_enabled boolean DEFAULT false NOT NULL, + markdown_surround_selection boolean DEFAULT true NOT NULL, + diffs_deletion_color text, + diffs_addition_color text, + CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)), + CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7)) ); -COMMENT ON TABLE dast_profile_schedules IS '{"owner":"group::dynamic analysis","description":"Scheduling for scans using DAST Profiles"}'; - -CREATE SEQUENCE dast_profile_schedules_id_seq +CREATE SEQUENCE user_preferences_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_profile_schedules_id_seq OWNED BY dast_profile_schedules.id; +ALTER SEQUENCE user_preferences_id_seq OWNED BY user_preferences.id; -CREATE TABLE dast_profiles ( - id bigint NOT NULL, - project_id bigint NOT NULL, - dast_site_profile_id bigint NOT NULL, - dast_scanner_profile_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - name text NOT NULL, - description text NOT NULL, - branch_name text, - CONSTRAINT check_5fcf73bf61 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_6c9d775949 CHECK ((char_length(branch_name) <= 255)), - CONSTRAINT check_c34e505c24 CHECK ((char_length(description) <= 255)) +CREATE TABLE user_statuses ( + user_id integer NOT NULL, + cached_markdown_version integer, + emoji character varying DEFAULT 'speech_balloon'::character varying NOT NULL, + message character varying(100), + message_html character varying, + availability smallint DEFAULT 0 NOT NULL, + clear_status_at timestamp with time zone ); -COMMENT ON TABLE dast_profiles IS '{"owner":"group::dynamic analysis","description":"Profile used to run a DAST on-demand scan"}'; - -CREATE SEQUENCE dast_profiles_id_seq +CREATE SEQUENCE user_statuses_user_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_profiles_id_seq OWNED BY dast_profiles.id; - -CREATE TABLE dast_profiles_pipelines ( - dast_profile_id bigint NOT NULL, - ci_pipeline_id bigint NOT NULL -); - -COMMENT ON TABLE dast_profiles_pipelines IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Profiles and CI Pipelines"}'; - -CREATE TABLE dast_scanner_profiles ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - spider_timeout smallint, - target_timeout smallint, - name text NOT NULL, - scan_type smallint DEFAULT 1 NOT NULL, - use_ajax_spider boolean DEFAULT false NOT NULL, - show_debug_messages boolean DEFAULT false NOT NULL, - CONSTRAINT check_568568fabf CHECK ((char_length(name) <= 255)) -); +ALTER SEQUENCE user_statuses_user_id_seq OWNED BY user_statuses.user_id; -CREATE TABLE dast_scanner_profiles_builds ( - dast_scanner_profile_id bigint NOT NULL, - ci_build_id bigint NOT NULL +CREATE TABLE user_synced_attributes_metadata ( + id integer NOT NULL, + name_synced boolean DEFAULT false, + email_synced boolean DEFAULT false, + location_synced boolean DEFAULT false, + user_id integer NOT NULL, + provider character varying ); -COMMENT ON TABLE dast_scanner_profiles_builds IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Scanner Profiles and CI Builds"}'; - -CREATE SEQUENCE dast_scanner_profiles_id_seq +CREATE SEQUENCE user_synced_attributes_metadata_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_scanner_profiles_id_seq OWNED BY dast_scanner_profiles.id; +ALTER SEQUENCE user_synced_attributes_metadata_id_seq OWNED BY user_synced_attributes_metadata.id; -CREATE TABLE dast_site_profile_secret_variables ( - id bigint NOT NULL, - dast_site_profile_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL, - key text NOT NULL, - encrypted_value bytea NOT NULL, - encrypted_value_iv bytea NOT NULL, - CONSTRAINT check_236213f179 CHECK ((length(encrypted_value) <= 13352)), - CONSTRAINT check_8cbef204b2 CHECK ((char_length(key) <= 255)), - CONSTRAINT check_b49080abbf CHECK ((length(encrypted_value_iv) <= 17)) +CREATE TABLE users ( + id integer NOT NULL, + email character varying DEFAULT ''::character varying NOT NULL, + encrypted_password character varying DEFAULT ''::character varying NOT NULL, + reset_password_token character varying, + reset_password_sent_at timestamp without time zone, + remember_created_at timestamp without time zone, + sign_in_count integer DEFAULT 0, + current_sign_in_at timestamp without time zone, + last_sign_in_at timestamp without time zone, + current_sign_in_ip character varying, + last_sign_in_ip character varying, + created_at timestamp without time zone, + updated_at timestamp without time zone, + name character varying, + admin boolean DEFAULT false NOT NULL, + projects_limit integer NOT NULL, + skype character varying DEFAULT ''::character varying NOT NULL, + linkedin character varying DEFAULT ''::character varying NOT NULL, + twitter character varying DEFAULT ''::character varying NOT NULL, + failed_attempts integer DEFAULT 0, + locked_at timestamp without time zone, + username character varying, + can_create_group boolean DEFAULT true NOT NULL, + can_create_team boolean DEFAULT true NOT NULL, + state character varying, + color_scheme_id integer DEFAULT 1 NOT NULL, + password_expires_at timestamp without time zone, + created_by_id integer, + last_credential_check_at timestamp without time zone, + avatar character varying, + confirmation_token character varying, + confirmed_at timestamp without time zone, + confirmation_sent_at timestamp without time zone, + unconfirmed_email character varying, + hide_no_ssh_key boolean DEFAULT false, + website_url character varying DEFAULT ''::character varying NOT NULL, + notification_email character varying, + hide_no_password boolean DEFAULT false, + password_automatically_set boolean DEFAULT false, + location character varying, + encrypted_otp_secret character varying, + encrypted_otp_secret_iv character varying, + encrypted_otp_secret_salt character varying, + otp_required_for_login boolean DEFAULT false NOT NULL, + otp_backup_codes text, + public_email character varying, + dashboard integer DEFAULT 0, + project_view integer DEFAULT 0, + consumed_timestep integer, + layout integer DEFAULT 0, + hide_project_limit boolean DEFAULT false, + unlock_token character varying, + otp_grace_period_started_at timestamp without time zone, + external boolean DEFAULT false, + incoming_email_token character varying, + organization character varying, + require_two_factor_authentication_from_group boolean DEFAULT false NOT NULL, + two_factor_grace_period integer DEFAULT 48 NOT NULL, + last_activity_on date, + notified_of_own_activity boolean, + preferred_language character varying, + theme_id smallint, + include_private_contributions boolean, + feed_token character varying, + accepted_term_id integer, + private_profile boolean DEFAULT false NOT NULL, + commit_email character varying, + auditor boolean DEFAULT false NOT NULL, + admin_email_unsubscribed_at timestamp without time zone, + email_opted_in boolean, + email_opted_in_at timestamp without time zone, + email_opted_in_ip character varying, + email_opted_in_source_id integer, + group_view integer, + managing_group_id integer, + note text, + roadmap_layout smallint, + static_object_token character varying(255), + first_name character varying(255), + last_name character varying(255), + role smallint, + user_type smallint, + static_object_token_encrypted text, + CONSTRAINT check_7bde697e8e CHECK ((char_length(static_object_token_encrypted) <= 255)) ); -COMMENT ON TABLE dast_site_profile_secret_variables IS '{"owner":"group::dynamic analysis","description":"Secret variables used in DAST on-demand scans"}'; - -CREATE SEQUENCE dast_site_profile_secret_variables_id_seq +CREATE SEQUENCE users_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_site_profile_secret_variables_id_seq OWNED BY dast_site_profile_secret_variables.id; +ALTER SEQUENCE users_id_seq OWNED BY users.id; -CREATE TABLE dast_site_profiles ( +CREATE TABLE users_ops_dashboard_projects ( id bigint NOT NULL, - project_id bigint NOT NULL, - dast_site_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - name text NOT NULL, - excluded_urls text[] DEFAULT '{}'::text[] NOT NULL, - auth_enabled boolean DEFAULT false NOT NULL, - auth_url text, - auth_username_field text, - auth_password_field text, - auth_username text, - target_type smallint DEFAULT 0 NOT NULL, - 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)), - CONSTRAINT check_d446f7047b CHECK ((char_length(auth_url) <= 1024)), - CONSTRAINT check_f22f18002a CHECK ((char_length(auth_username) <= 255)) -); - -CREATE TABLE dast_site_profiles_builds ( - dast_site_profile_id bigint NOT NULL, - ci_build_id bigint NOT NULL + user_id integer NOT NULL, + project_id integer NOT NULL ); -COMMENT ON TABLE dast_site_profiles_builds IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Site Profiles and CI Builds"}'; - -CREATE SEQUENCE dast_site_profiles_id_seq +CREATE SEQUENCE users_ops_dashboard_projects_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_site_profiles_id_seq OWNED BY dast_site_profiles.id; +ALTER SEQUENCE users_ops_dashboard_projects_id_seq OWNED BY users_ops_dashboard_projects.id; -CREATE TABLE dast_site_profiles_pipelines ( - dast_site_profile_id bigint NOT NULL, - ci_pipeline_id bigint NOT NULL +CREATE TABLE users_security_dashboard_projects ( + user_id bigint NOT NULL, + project_id bigint NOT NULL ); -COMMENT ON TABLE dast_site_profiles_pipelines IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Site Profiles and CI Pipelines"}'; - -CREATE TABLE dast_site_tokens ( - 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, - expired_at timestamp with time zone, - token text NOT NULL, - url text NOT NULL, - CONSTRAINT check_02a6bf20a7 CHECK ((char_length(token) <= 255)), - CONSTRAINT check_69ab8622a6 CHECK ((char_length(url) <= 255)) +CREATE TABLE users_star_projects ( + id integer NOT NULL, + project_id integer NOT NULL, + user_id integer NOT NULL, + created_at timestamp without time zone, + updated_at timestamp without time zone ); -CREATE SEQUENCE dast_site_tokens_id_seq +CREATE SEQUENCE users_star_projects_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_site_tokens_id_seq OWNED BY dast_site_tokens.id; +ALTER SEQUENCE users_star_projects_id_seq OWNED BY users_star_projects.id; -CREATE TABLE dast_site_validations ( +CREATE TABLE users_statistics ( id bigint NOT NULL, - dast_site_token_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - validation_started_at timestamp with time zone, - validation_passed_at timestamp with time zone, - validation_failed_at timestamp with time zone, - validation_last_retried_at timestamp with time zone, - validation_strategy smallint NOT NULL, - url_base text NOT NULL, - url_path text NOT NULL, - state text DEFAULT 'pending'::text NOT NULL, - CONSTRAINT check_13b34efe4b CHECK ((char_length(url_path) <= 255)), - CONSTRAINT check_283be72e9b CHECK ((char_length(state) <= 255)), - CONSTRAINT check_cd3b538210 CHECK ((char_length(url_base) <= 255)) + without_groups_and_projects integer DEFAULT 0 NOT NULL, + with_highest_role_guest integer DEFAULT 0 NOT NULL, + with_highest_role_reporter integer DEFAULT 0 NOT NULL, + with_highest_role_developer integer DEFAULT 0 NOT NULL, + 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, + with_highest_role_minimal_access integer DEFAULT 0 NOT NULL ); -CREATE SEQUENCE dast_site_validations_id_seq +CREATE SEQUENCE users_statistics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dast_site_validations_id_seq OWNED BY dast_site_validations.id; +ALTER SEQUENCE users_statistics_id_seq OWNED BY users_statistics.id; -CREATE TABLE dast_sites ( +CREATE TABLE vulnerabilities ( id bigint NOT NULL, + milestone_id bigint, + epic_id bigint, project_id bigint NOT NULL, + author_id bigint NOT NULL, + updated_by_id bigint, + last_edited_by_id bigint, + start_date_sourcing_milestone_id bigint, + due_date_sourcing_milestone_id bigint, + last_edited_at timestamp with time zone, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - url text NOT NULL, - dast_site_validation_id bigint, - CONSTRAINT check_46df8b449c CHECK ((char_length(url) <= 255)) -); - -CREATE SEQUENCE dast_sites_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -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 + start_date date, + due_date date, + state smallint DEFAULT 1 NOT NULL, + severity smallint NOT NULL, + confidence smallint NOT NULL, + severity_overridden boolean DEFAULT false, + confidence_overridden boolean DEFAULT false, + title character varying(255) NOT NULL, + title_html text, + description text, + description_html text, + report_type smallint NOT NULL, + cached_markdown_version integer, + resolved_by_id bigint, + resolved_at timestamp with time zone, + confirmed_by_id bigint, + confirmed_at timestamp with time zone, + dismissed_at timestamp with time zone, + dismissed_by_id bigint, + resolved_on_default_branch boolean DEFAULT false NOT NULL, + present_on_default_branch boolean DEFAULT true NOT NULL, + detected_at timestamp with time zone DEFAULT now() ); -CREATE SEQUENCE dep_ci_build_trace_section_names_id_seq - AS integer +CREATE SEQUENCE vulnerabilities_id_seq 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 -); +ALTER SEQUENCE vulnerabilities_id_seq OWNED BY vulnerabilities.id; -CREATE TABLE dependency_proxy_blobs ( - id integer NOT NULL, +CREATE TABLE vulnerability_exports ( + id bigint NOT NULL, created_at timestamp with time zone NOT NULL, - file text NOT NULL, - file_name character varying NOT NULL, + updated_at timestamp with time zone NOT NULL, + started_at timestamp with time zone, + finished_at timestamp with time zone, + status character varying(255) NOT NULL, + file character varying(255), + project_id bigint, + author_id bigint NOT NULL, file_store integer, - group_id integer NOT NULL, - size bigint, - updated_at timestamp with time zone NOT NULL -); - -CREATE SEQUENCE dependency_proxy_blobs_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE dependency_proxy_blobs_id_seq OWNED BY dependency_proxy_blobs.id; - -CREATE TABLE dependency_proxy_group_settings ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - enabled boolean DEFAULT false NOT NULL, - group_id integer NOT NULL, - updated_at timestamp with time zone NOT NULL + format smallint DEFAULT 0 NOT NULL, + group_id integer ); -CREATE SEQUENCE dependency_proxy_group_settings_id_seq - AS integer +CREATE SEQUENCE vulnerability_exports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dependency_proxy_group_settings_id_seq OWNED BY dependency_proxy_group_settings.id; - -CREATE TABLE dependency_proxy_image_ttl_group_policies ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - ttl integer DEFAULT 90, - enabled boolean DEFAULT false NOT NULL -); +ALTER SEQUENCE vulnerability_exports_id_seq OWNED BY vulnerability_exports.id; -CREATE TABLE dependency_proxy_manifests ( +CREATE TABLE vulnerability_external_issue_links ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - size bigint, - file_store smallint, - file_name text NOT NULL, - file text NOT NULL, - digest text NOT NULL, - content_type text, - 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)), - CONSTRAINT check_f5d9996bf1 CHECK ((char_length(digest) <= 255)) + author_id bigint NOT NULL, + vulnerability_id bigint NOT NULL, + link_type smallint DEFAULT 1 NOT NULL, + external_type smallint DEFAULT 1 NOT NULL, + external_project_key text NOT NULL, + external_issue_key text NOT NULL, + CONSTRAINT check_3200604f5e CHECK ((char_length(external_issue_key) <= 255)), + CONSTRAINT check_68cffd19b0 CHECK ((char_length(external_project_key) <= 255)) ); -CREATE SEQUENCE dependency_proxy_manifests_id_seq +CREATE SEQUENCE vulnerability_external_issue_links_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dependency_proxy_manifests_id_seq OWNED BY dependency_proxy_manifests.id; +ALTER SEQUENCE vulnerability_external_issue_links_id_seq OWNED BY vulnerability_external_issue_links.id; -CREATE TABLE deploy_keys_projects ( +CREATE TABLE vulnerability_feedback ( id integer NOT NULL, - deploy_key_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + feedback_type smallint NOT NULL, + category smallint NOT NULL, project_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - can_push boolean DEFAULT false NOT NULL + author_id integer NOT NULL, + pipeline_id integer, + issue_id integer, + project_fingerprint character varying(40) NOT NULL, + merge_request_id integer, + comment_author_id integer, + comment text, + comment_timestamp timestamp with time zone, + finding_uuid uuid, + dismissal_reason smallint ); -CREATE SEQUENCE deploy_keys_projects_id_seq +CREATE SEQUENCE vulnerability_feedback_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -13894,364 +22656,387 @@ CREATE SEQUENCE deploy_keys_projects_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE deploy_keys_projects_id_seq OWNED BY deploy_keys_projects.id; +ALTER SEQUENCE vulnerability_feedback_id_seq OWNED BY vulnerability_feedback.id; -CREATE TABLE deploy_tokens ( - id integer NOT NULL, - revoked boolean DEFAULT false, - read_repository boolean DEFAULT false NOT NULL, - read_registry boolean DEFAULT false NOT NULL, - expires_at timestamp with time zone NOT NULL, +CREATE TABLE vulnerability_finding_evidences ( + id bigint NOT NULL, created_at timestamp with time zone NOT NULL, - name character varying NOT NULL, - token character varying, - username character varying, - token_encrypted character varying(255), - deploy_token_type smallint DEFAULT 2 NOT NULL, - write_registry boolean DEFAULT false NOT NULL, - read_package_registry boolean DEFAULT false NOT NULL, - write_package_registry boolean DEFAULT false NOT NULL + updated_at timestamp with time zone NOT NULL, + vulnerability_occurrence_id bigint NOT NULL, + data jsonb DEFAULT '{}'::jsonb NOT NULL ); -CREATE SEQUENCE deploy_tokens_id_seq - AS integer +CREATE SEQUENCE vulnerability_finding_evidences_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE deploy_tokens_id_seq OWNED BY deploy_tokens.id; +ALTER SEQUENCE vulnerability_finding_evidences_id_seq OWNED BY vulnerability_finding_evidences.id; -CREATE TABLE deployment_clusters ( - deployment_id integer NOT NULL, - cluster_id integer NOT NULL, - kubernetes_namespace character varying(255) +CREATE TABLE vulnerability_finding_links ( + 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, + name text, + url text NOT NULL, + CONSTRAINT check_55f0a95439 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_b7fe886df6 CHECK ((char_length(url) <= 2048)) ); -CREATE TABLE deployment_merge_requests ( - deployment_id integer NOT NULL, - merge_request_id integer NOT NULL, - environment_id integer -); +CREATE SEQUENCE vulnerability_finding_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -CREATE TABLE deployments ( - id integer NOT NULL, - iid integer NOT NULL, - project_id integer NOT NULL, - environment_id integer NOT NULL, - ref character varying NOT NULL, - 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, - on_stop character varying, - finished_at timestamp with time zone, - status smallint NOT NULL, - cluster_id integer, - deployable_id bigint +ALTER SEQUENCE vulnerability_finding_links_id_seq OWNED BY vulnerability_finding_links.id; + +CREATE TABLE vulnerability_finding_signatures ( + id bigint NOT NULL, + finding_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + algorithm_type smallint NOT NULL, + signature_sha bytea NOT NULL ); -CREATE SEQUENCE deployments_id_seq - AS integer +CREATE SEQUENCE vulnerability_finding_signatures_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE deployments_id_seq OWNED BY deployments.id; +ALTER SEQUENCE vulnerability_finding_signatures_id_seq OWNED BY vulnerability_finding_signatures.id; -CREATE TABLE description_versions ( +CREATE TABLE vulnerability_findings_remediations ( id bigint NOT NULL, + vulnerability_occurrence_id bigint, + vulnerability_remediation_id bigint, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - issue_id integer, - merge_request_id integer, - epic_id integer, - description text, - deleted_at timestamp with time zone + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE description_versions_id_seq +CREATE SEQUENCE vulnerability_findings_remediations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE description_versions_id_seq OWNED BY description_versions.id; +ALTER SEQUENCE vulnerability_findings_remediations_id_seq OWNED BY vulnerability_findings_remediations.id; -CREATE TABLE design_management_designs ( +CREATE TABLE vulnerability_flags ( id bigint NOT NULL, - project_id integer NOT NULL, - issue_id integer, - filename character varying NOT NULL, - relative_position integer, - iid integer, - CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255)), - CONSTRAINT check_cfb92df01a CHECK ((iid IS NOT NULL)) + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + vulnerability_occurrence_id bigint NOT NULL, + flag_type smallint DEFAULT 0 NOT NULL, + origin text NOT NULL, + description text NOT NULL, + CONSTRAINT check_45e743349f CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_49c1d00032 CHECK ((char_length(origin) <= 255)) ); -CREATE SEQUENCE design_management_designs_id_seq +CREATE SEQUENCE vulnerability_flags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE design_management_designs_id_seq OWNED BY design_management_designs.id; +ALTER SEQUENCE vulnerability_flags_id_seq OWNED BY vulnerability_flags.id; -CREATE TABLE design_management_designs_versions ( - design_id bigint NOT NULL, - version_id bigint NOT NULL, - event smallint DEFAULT 0 NOT NULL, - image_v432x230 character varying(255), - id bigint NOT NULL +CREATE TABLE vulnerability_historical_statistics ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + total integer DEFAULT 0 NOT NULL, + critical integer DEFAULT 0 NOT NULL, + high integer DEFAULT 0 NOT NULL, + medium integer DEFAULT 0 NOT NULL, + low integer DEFAULT 0 NOT NULL, + unknown integer DEFAULT 0 NOT NULL, + info integer DEFAULT 0 NOT NULL, + date date NOT NULL, + letter_grade smallint NOT NULL ); -CREATE SEQUENCE design_management_designs_versions_id_seq +CREATE SEQUENCE vulnerability_historical_statistics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE design_management_designs_versions_id_seq OWNED BY design_management_designs_versions.id; +ALTER SEQUENCE vulnerability_historical_statistics_id_seq OWNED BY vulnerability_historical_statistics.id; -CREATE TABLE design_management_versions ( +CREATE TABLE vulnerability_identifiers ( id bigint NOT NULL, - sha bytea NOT NULL, - issue_id bigint, created_at timestamp with time zone NOT NULL, - author_id integer + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + fingerprint bytea NOT NULL, + external_type character varying NOT NULL, + external_id character varying NOT NULL, + name character varying NOT NULL, + url text ); -CREATE SEQUENCE design_management_versions_id_seq +CREATE SEQUENCE vulnerability_identifiers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE design_management_versions_id_seq OWNED BY design_management_versions.id; +ALTER SEQUENCE vulnerability_identifiers_id_seq OWNED BY vulnerability_identifiers.id; -CREATE TABLE design_user_mentions ( +CREATE TABLE vulnerability_issue_links ( id bigint NOT NULL, - design_id integer NOT NULL, - note_id integer NOT NULL, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + vulnerability_id bigint NOT NULL, + issue_id bigint NOT NULL, + link_type smallint DEFAULT 1 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL ); -CREATE SEQUENCE design_user_mentions_id_seq +CREATE SEQUENCE vulnerability_issue_links_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE design_user_mentions_id_seq OWNED BY design_user_mentions.id; +ALTER SEQUENCE vulnerability_issue_links_id_seq OWNED BY vulnerability_issue_links.id; -CREATE TABLE detached_partitions ( +CREATE TABLE vulnerability_occurrence_identifiers ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - drop_after timestamp with time zone NOT NULL, - table_name text NOT NULL, - CONSTRAINT check_aecee24ba3 CHECK ((char_length(table_name) <= 63)) + occurrence_id bigint NOT NULL, + identifier_id bigint NOT NULL ); -CREATE SEQUENCE detached_partitions_id_seq +CREATE SEQUENCE vulnerability_occurrence_identifiers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE detached_partitions_id_seq OWNED BY detached_partitions.id; +ALTER SEQUENCE vulnerability_occurrence_identifiers_id_seq OWNED BY vulnerability_occurrence_identifiers.id; -CREATE TABLE diff_note_positions ( +CREATE TABLE vulnerability_occurrence_pipelines ( id bigint NOT NULL, - note_id bigint NOT NULL, - old_line integer, - new_line integer, - diff_content_type smallint NOT NULL, - diff_type smallint NOT NULL, - line_code character varying(255) NOT NULL, - base_sha bytea NOT NULL, - start_sha bytea NOT NULL, - head_sha bytea NOT NULL, - old_path text NOT NULL, - new_path text NOT NULL + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + occurrence_id bigint NOT NULL, + pipeline_id integer NOT NULL ); -CREATE SEQUENCE diff_note_positions_id_seq +CREATE SEQUENCE vulnerability_occurrence_pipelines_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE diff_note_positions_id_seq OWNED BY diff_note_positions.id; +ALTER SEQUENCE vulnerability_occurrence_pipelines_id_seq OWNED BY vulnerability_occurrence_pipelines.id; -CREATE TABLE dora_daily_metrics ( +CREATE TABLE vulnerability_occurrences ( id bigint NOT NULL, - environment_id bigint NOT NULL, - date date NOT NULL, - deployment_frequency integer, - lead_time_for_changes_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)) + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + severity smallint NOT NULL, + confidence smallint NOT NULL, + report_type smallint NOT NULL, + project_id integer NOT NULL, + scanner_id bigint NOT NULL, + primary_identifier_id bigint NOT NULL, + project_fingerprint bytea NOT NULL, + location_fingerprint bytea NOT NULL, + uuid character varying(36) NOT NULL, + name character varying NOT NULL, + metadata_version character varying NOT NULL, + raw_metadata text NOT NULL, + vulnerability_id bigint, + details jsonb DEFAULT '{}'::jsonb NOT NULL, + description text, + message text, + solution text, + 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)), + CONSTRAINT check_f602da68dd CHECK ((char_length(cve) <= 48400)) ); -CREATE SEQUENCE dora_daily_metrics_id_seq +CREATE SEQUENCE vulnerability_occurrences_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE dora_daily_metrics_id_seq OWNED BY dora_daily_metrics.id; +ALTER SEQUENCE vulnerability_occurrences_id_seq OWNED BY vulnerability_occurrences.id; -CREATE TABLE draft_notes ( +CREATE TABLE vulnerability_reads ( id bigint NOT NULL, - merge_request_id integer NOT NULL, - author_id integer NOT NULL, - resolve_discussion boolean DEFAULT false NOT NULL, - discussion_id character varying, - note text NOT NULL, - "position" text, - original_position text, - change_position text, - commit_id bytea + 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 draft_notes_id_seq +CREATE SEQUENCE vulnerability_reads_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE draft_notes_id_seq OWNED BY draft_notes.id; +ALTER SEQUENCE vulnerability_reads_id_seq OWNED BY vulnerability_reads.id; -CREATE TABLE elastic_index_settings ( +CREATE TABLE vulnerability_remediations ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - number_of_replicas smallint DEFAULT 1 NOT NULL, - number_of_shards smallint DEFAULT 5 NOT NULL, - alias_name text NOT NULL, - CONSTRAINT check_c30005c325 CHECK ((char_length(alias_name) <= 255)) + file_store smallint, + summary text NOT NULL, + file text NOT NULL, + checksum bytea NOT NULL, + project_id bigint NOT NULL, + CONSTRAINT check_ac0ccabff3 CHECK ((char_length(summary) <= 200)), + CONSTRAINT check_fe3325e3ba CHECK ((char_length(file) <= 255)) ); -CREATE SEQUENCE elastic_index_settings_id_seq +COMMENT ON COLUMN vulnerability_remediations.checksum IS 'Stores the SHA256 checksum of the attached diff file'; + +CREATE SEQUENCE vulnerability_remediations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE elastic_index_settings_id_seq OWNED BY elastic_index_settings.id; +ALTER SEQUENCE vulnerability_remediations_id_seq OWNED BY vulnerability_remediations.id; -CREATE TABLE elastic_reindexing_slices ( +CREATE TABLE vulnerability_scanners ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - elastic_reindexing_subtask_id bigint NOT NULL, - elastic_slice smallint DEFAULT 0 NOT NULL, - elastic_max_slice smallint DEFAULT 0 NOT NULL, - retry_attempt smallint DEFAULT 0 NOT NULL, - elastic_task text, - CONSTRAINT check_ca30e1396e CHECK ((char_length(elastic_task) <= 255)) + project_id integer NOT NULL, + external_id character varying NOT NULL, + name character varying NOT NULL, + vendor text DEFAULT 'GitLab'::text NOT NULL ); -CREATE SEQUENCE elastic_reindexing_slices_id_seq +CREATE SEQUENCE vulnerability_scanners_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE elastic_reindexing_slices_id_seq OWNED BY elastic_reindexing_slices.id; +ALTER SEQUENCE vulnerability_scanners_id_seq OWNED BY vulnerability_scanners.id; -CREATE TABLE elastic_reindexing_subtasks ( +CREATE TABLE vulnerability_statistics ( id bigint NOT NULL, - elastic_reindexing_task_id bigint NOT NULL, - alias_name text NOT NULL, - index_name_from text NOT NULL, - index_name_to text NOT NULL, - elastic_task text, - documents_count_target integer, - documents_count integer, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_4910adc798 CHECK ((char_length(elastic_task) <= 255)), - CONSTRAINT check_88f56216a4 CHECK ((char_length(alias_name) <= 255)), - CONSTRAINT check_a1fbd9faa9 CHECK ((char_length(index_name_from) <= 255)), - CONSTRAINT check_f456494bd8 CHECK ((char_length(index_name_to) <= 255)) + project_id bigint NOT NULL, + total integer DEFAULT 0 NOT NULL, + critical integer DEFAULT 0 NOT NULL, + high integer DEFAULT 0 NOT NULL, + medium integer DEFAULT 0 NOT NULL, + low integer DEFAULT 0 NOT NULL, + unknown integer DEFAULT 0 NOT NULL, + info integer DEFAULT 0 NOT NULL, + letter_grade smallint NOT NULL, + latest_pipeline_id bigint ); -CREATE SEQUENCE elastic_reindexing_subtasks_id_seq +CREATE SEQUENCE vulnerability_statistics_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE elastic_reindexing_subtasks_id_seq OWNED BY elastic_reindexing_subtasks.id; +ALTER SEQUENCE vulnerability_statistics_id_seq OWNED BY vulnerability_statistics.id; -CREATE TABLE elastic_reindexing_tasks ( +CREATE TABLE vulnerability_user_mentions ( id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - state smallint DEFAULT 0 NOT NULL, - in_progress boolean DEFAULT true NOT NULL, - error_message text, - delete_original_index_at timestamp with time zone, - max_slices_running smallint DEFAULT 60 NOT NULL, - slice_multiplier smallint DEFAULT 2 NOT NULL, - CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255)) + vulnerability_id bigint NOT NULL, + note_id integer, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] ); -CREATE SEQUENCE elastic_reindexing_tasks_id_seq +CREATE SEQUENCE vulnerability_user_mentions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE elastic_reindexing_tasks_id_seq OWNED BY elastic_reindexing_tasks.id; - -CREATE TABLE elasticsearch_indexed_namespaces ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - namespace_id integer NOT NULL -); - -CREATE TABLE elasticsearch_indexed_projects ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL -); +ALTER SEQUENCE vulnerability_user_mentions_id_seq OWNED BY vulnerability_user_mentions.id; -CREATE TABLE emails ( +CREATE TABLE web_hooks ( id integer NOT NULL, - user_id integer NOT NULL, - email character varying NOT NULL, + project_id integer, created_at timestamp without time zone, updated_at timestamp without time zone, - confirmation_token character varying, - confirmed_at timestamp with time zone, - confirmation_sent_at timestamp with time zone + type character varying DEFAULT 'ProjectHook'::character varying, + service_id integer, + push_events boolean DEFAULT true NOT NULL, + issues_events boolean DEFAULT false NOT NULL, + merge_requests_events boolean DEFAULT false NOT NULL, + tag_push_events boolean DEFAULT false, + note_events boolean DEFAULT false NOT NULL, + enable_ssl_verification boolean DEFAULT true, + wiki_page_events boolean DEFAULT false NOT NULL, + pipeline_events boolean DEFAULT false NOT NULL, + confidential_issues_events boolean DEFAULT false NOT NULL, + repository_update_events boolean DEFAULT false NOT NULL, + job_events boolean DEFAULT false NOT NULL, + confidential_note_events boolean, + push_events_branch_filter text, + encrypted_token character varying, + encrypted_token_iv character varying, + encrypted_url character varying, + encrypted_url_iv character varying, + group_id integer, + deployment_events boolean DEFAULT false NOT NULL, + feature_flag_events boolean DEFAULT false NOT NULL, + releases_events boolean DEFAULT false NOT NULL, + member_events boolean DEFAULT false NOT NULL, + subgroup_events boolean DEFAULT false NOT NULL, + recent_failures smallint DEFAULT 0 NOT NULL, + backoff_count smallint DEFAULT 0 NOT NULL, + disabled_until timestamp with time zone ); -CREATE SEQUENCE emails_id_seq +CREATE SEQUENCE web_hooks_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -14259,41 +23044,40 @@ CREATE SEQUENCE emails_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE emails_id_seq OWNED BY emails.id; +ALTER SEQUENCE web_hooks_id_seq OWNED BY web_hooks.id; -CREATE TABLE environments ( - id integer NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - external_url character varying, - environment_type character varying, - state character varying DEFAULT 'available'::character varying NOT NULL, - slug character varying NOT NULL, - auto_stop_at timestamp with time zone, - auto_delete_at timestamp with time zone, - tier smallint +CREATE TABLE webauthn_registrations ( + id bigint NOT NULL, + user_id bigint NOT NULL, + counter bigint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + credential_xid text NOT NULL, + name text NOT NULL, + public_key text NOT NULL, + u2f_registration_id integer, + CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e54008d9ce CHECK ((char_length(credential_xid) <= 340)) ); -CREATE SEQUENCE environments_id_seq - AS integer +CREATE SEQUENCE webauthn_registrations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE environments_id_seq OWNED BY environments.id; +ALTER SEQUENCE webauthn_registrations_id_seq OWNED BY webauthn_registrations.id; -CREATE TABLE epic_issues ( +CREATE TABLE wiki_page_meta ( id integer NOT NULL, - epic_id integer NOT NULL, - issue_id integer NOT NULL, - relative_position integer + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + title character varying(255) NOT NULL ); -CREATE SEQUENCE epic_issues_id_seq +CREATE SEQUENCE wiki_page_meta_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -14301,16 +23085,18 @@ CREATE SEQUENCE epic_issues_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE epic_issues_id_seq OWNED BY epic_issues.id; +ALTER SEQUENCE wiki_page_meta_id_seq OWNED BY wiki_page_meta.id; -CREATE TABLE epic_metrics ( +CREATE TABLE wiki_page_slugs ( id integer NOT NULL, - epic_id integer NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL + canonical boolean DEFAULT false NOT NULL, + wiki_page_meta_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + slug character varying(2048) NOT NULL ); -CREATE SEQUENCE epic_metrics_id_seq +CREATE SEQUENCE wiki_page_slugs_id_seq AS integer START WITH 1 INCREMENT BY 1 @@ -14318,14124 +23104,9283 @@ CREATE SEQUENCE epic_metrics_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE epic_metrics_id_seq OWNED BY epic_metrics.id; +ALTER SEQUENCE wiki_page_slugs_id_seq OWNED BY wiki_page_slugs.id; -CREATE TABLE epic_user_mentions ( +CREATE TABLE work_item_types ( id bigint NOT NULL, - epic_id integer NOT NULL, - note_id integer, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + base_type smallint DEFAULT 0 NOT NULL, + cached_markdown_version integer, + name text NOT NULL, + description text, + description_html text, + icon_name text, + namespace_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_104d2410f6 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_fecb3a98d1 CHECK ((char_length(icon_name) <= 255)) ); -CREATE SEQUENCE epic_user_mentions_id_seq +CREATE SEQUENCE work_item_types_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE epic_user_mentions_id_seq OWNED BY epic_user_mentions.id; - -CREATE TABLE epics ( - id integer NOT NULL, - group_id integer NOT NULL, - author_id integer NOT NULL, - assignee_id integer, - iid integer NOT NULL, - cached_markdown_version integer, - updated_by_id integer, - last_edited_by_id integer, - lock_version integer DEFAULT 0, - start_date date, - end_date date, - last_edited_at timestamp without time zone, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - title character varying NOT NULL, - title_html character varying NOT NULL, - description text, - description_html text, - start_date_sourcing_milestone_id integer, - due_date_sourcing_milestone_id integer, - start_date_fixed date, - due_date_fixed date, - start_date_is_fixed boolean, - due_date_is_fixed boolean, - closed_by_id integer, - closed_at timestamp without time zone, - parent_id integer, - relative_position integer, - start_date_sourcing_epic_id integer, - due_date_sourcing_epic_id integer, - state_id smallint DEFAULT 1, - external_key character varying(255), - confidential boolean DEFAULT false NOT NULL, - CONSTRAINT check_57ee003890 CHECK ((state_id IS NOT NULL)) +ALTER SEQUENCE work_item_types_id_seq OWNED BY work_item_types.id; + +CREATE TABLE x509_certificates ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + subject_key_identifier character varying(255) NOT NULL, + subject character varying(255) NOT NULL, + email character varying(255) NOT NULL, + serial_number bytea NOT NULL, + certificate_status smallint DEFAULT 0 NOT NULL, + x509_issuer_id bigint NOT NULL ); -CREATE SEQUENCE epics_id_seq - AS integer +CREATE SEQUENCE x509_certificates_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE epics_id_seq OWNED BY epics.id; +ALTER SEQUENCE x509_certificates_id_seq OWNED BY x509_certificates.id; -CREATE TABLE error_tracking_client_keys ( +CREATE TABLE x509_commit_signatures ( id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, project_id bigint NOT NULL, - active boolean DEFAULT true NOT NULL, - public_key text NOT NULL, + x509_certificate_id bigint NOT NULL, + commit_sha bytea NOT NULL, + verification_status smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE x509_commit_signatures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE x509_commit_signatures_id_seq OWNED BY x509_commit_signatures.id; + +CREATE TABLE x509_issuers ( + id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_840b719790 CHECK ((char_length(public_key) <= 255)) + subject_key_identifier character varying(255) NOT NULL, + subject character varying(255) NOT NULL, + crl_url character varying(255) NOT NULL ); -CREATE SEQUENCE error_tracking_client_keys_id_seq +CREATE SEQUENCE x509_issuers_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE error_tracking_client_keys_id_seq OWNED BY error_tracking_client_keys.id; +ALTER SEQUENCE x509_issuers_id_seq OWNED BY x509_issuers.id; -CREATE TABLE error_tracking_error_events ( +CREATE TABLE zentao_tracker_data ( id bigint NOT NULL, - error_id bigint NOT NULL, - description text NOT NULL, - environment text, - level text, - occurred_at timestamp with time zone NOT NULL, - payload jsonb DEFAULT '{}'::jsonb NOT NULL, + integration_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_92ecc3077b CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_c67d5b8007 CHECK ((char_length(level) <= 255)), - CONSTRAINT check_f4b52474ad CHECK ((char_length(environment) <= 255)) + encrypted_url bytea, + encrypted_url_iv bytea, + encrypted_api_url bytea, + encrypted_api_url_iv bytea, + encrypted_zentao_product_xid bytea, + encrypted_zentao_product_xid_iv bytea, + encrypted_api_token bytea, + encrypted_api_token_iv bytea ); -CREATE SEQUENCE error_tracking_error_events_id_seq +CREATE SEQUENCE zentao_tracker_data_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE error_tracking_error_events_id_seq OWNED BY error_tracking_error_events.id; +ALTER SEQUENCE zentao_tracker_data_id_seq OWNED BY zentao_tracker_data.id; -CREATE TABLE error_tracking_errors ( +CREATE TABLE zoom_meetings ( id bigint NOT NULL, project_id bigint NOT NULL, - name text NOT NULL, - description text NOT NULL, - actor text NOT NULL, - first_seen_at timestamp with time zone DEFAULT now() NOT NULL, - last_seen_at timestamp with time zone DEFAULT now() NOT NULL, - platform text, + issue_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - events_count bigint DEFAULT 0 NOT NULL, - status smallint DEFAULT 0 NOT NULL, - CONSTRAINT check_18a758e537 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_b5cb4d3888 CHECK ((char_length(actor) <= 255)), - CONSTRAINT check_c739788b12 CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_fe99886883 CHECK ((char_length(platform) <= 255)) + issue_status smallint DEFAULT 1 NOT NULL, + url character varying(255) ); -CREATE SEQUENCE error_tracking_errors_id_seq +CREATE SEQUENCE zoom_meetings_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE error_tracking_errors_id_seq OWNED BY error_tracking_errors.id; +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); + +ALTER TABLE ONLY alert_management_http_integrations ALTER COLUMN id SET DEFAULT nextval('alert_management_http_integrations_id_seq'::regclass); + +ALTER TABLE ONLY allowed_email_domains ALTER COLUMN id SET DEFAULT nextval('allowed_email_domains_id_seq'::regclass); + +ALTER TABLE ONLY analytics_cycle_analytics_group_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_stages_id_seq'::regclass); + +ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_value_streams_id_seq'::regclass); + +ALTER TABLE ONLY analytics_cycle_analytics_project_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_project_stages_id_seq'::regclass); + +ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_project_value_streams_id_seq'::regclass); + +ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_stage_event_hashes_id_seq'::regclass); + +ALTER TABLE ONLY analytics_devops_adoption_segments ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_segments_id_seq'::regclass); + +ALTER TABLE ONLY analytics_devops_adoption_snapshots ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_snapshots_id_seq'::regclass); + +ALTER TABLE ONLY analytics_usage_trends_measurements ALTER COLUMN id SET DEFAULT nextval('analytics_usage_trends_measurements_id_seq'::regclass); + +ALTER TABLE ONLY appearances ALTER COLUMN id SET DEFAULT nextval('appearances_id_seq'::regclass); + +ALTER TABLE ONLY application_setting_terms ALTER COLUMN id SET DEFAULT nextval('application_setting_terms_id_seq'::regclass); + +ALTER TABLE ONLY application_settings ALTER COLUMN id SET DEFAULT nextval('application_settings_id_seq'::regclass); + +ALTER TABLE ONLY approval_merge_request_rule_sources ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rule_sources_id_seq'::regclass); + +ALTER TABLE ONLY approval_merge_request_rules ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_id_seq'::regclass); + +ALTER TABLE ONLY approval_merge_request_rules_approved_approvers ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_approved_approvers_id_seq'::regclass); + +ALTER TABLE ONLY approval_merge_request_rules_groups ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_groups_id_seq'::regclass); + +ALTER TABLE ONLY approval_merge_request_rules_users ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_users_id_seq'::regclass); + +ALTER TABLE ONLY approval_project_rules ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_id_seq'::regclass); + +ALTER TABLE ONLY approval_project_rules_groups ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_groups_id_seq'::regclass); + +ALTER TABLE ONLY approval_project_rules_users ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_users_id_seq'::regclass); + +ALTER TABLE ONLY approvals ALTER COLUMN id SET DEFAULT nextval('approvals_id_seq'::regclass); + +ALTER TABLE ONLY approver_groups ALTER COLUMN id SET DEFAULT nextval('approver_groups_id_seq'::regclass); + +ALTER TABLE ONLY approvers ALTER COLUMN id SET DEFAULT nextval('approvers_id_seq'::regclass); + +ALTER TABLE ONLY atlassian_identities ALTER COLUMN user_id SET DEFAULT nextval('atlassian_identities_user_id_seq'::regclass); + +ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_id_seq'::regclass); + +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 authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass); + +ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass); + +ALTER TABLE ONLY background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('background_migration_jobs_id_seq'::regclass); + +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); + +ALTER TABLE ONLY board_assignees ALTER COLUMN id SET DEFAULT nextval('board_assignees_id_seq'::regclass); + +ALTER TABLE ONLY board_group_recent_visits ALTER COLUMN id SET DEFAULT nextval('board_group_recent_visits_id_seq'::regclass); + +ALTER TABLE ONLY board_labels ALTER COLUMN id SET DEFAULT nextval('board_labels_id_seq'::regclass); + +ALTER TABLE ONLY board_project_recent_visits ALTER COLUMN id SET DEFAULT nextval('board_project_recent_visits_id_seq'::regclass); + +ALTER TABLE ONLY board_user_preferences ALTER COLUMN id SET DEFAULT nextval('board_user_preferences_id_seq'::regclass); + +ALTER TABLE ONLY boards ALTER COLUMN id SET DEFAULT nextval('boards_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_board_labels ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_labels_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_board_positions ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_positions_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_board_recent_visits ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_recent_visits_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_boards ALTER COLUMN id SET DEFAULT nextval('boards_epic_boards_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_list_user_preferences ALTER COLUMN id SET DEFAULT nextval('boards_epic_list_user_preferences_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_lists ALTER COLUMN id SET DEFAULT nextval('boards_epic_lists_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_user_preferences ALTER COLUMN id SET DEFAULT nextval('boards_epic_user_preferences_id_seq'::regclass); + +ALTER TABLE ONLY broadcast_messages ALTER COLUMN id SET DEFAULT nextval('broadcast_messages_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_configurations ALTER COLUMN id SET DEFAULT nextval('bulk_import_configurations_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_entities ALTER COLUMN id SET DEFAULT nextval('bulk_import_entities_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_export_uploads ALTER COLUMN id SET DEFAULT nextval('bulk_import_export_uploads_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_exports ALTER COLUMN id SET DEFAULT nextval('bulk_import_exports_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_failures ALTER COLUMN id SET DEFAULT nextval('bulk_import_failures_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_trackers ALTER COLUMN id SET DEFAULT nextval('bulk_import_trackers_id_seq'::regclass); + +ALTER TABLE ONLY bulk_imports ALTER COLUMN id SET DEFAULT nextval('bulk_imports_id_seq'::regclass); + +ALTER TABLE ONLY chat_names ALTER COLUMN id SET DEFAULT nextval('chat_names_id_seq'::regclass); + +ALTER TABLE ONLY chat_teams ALTER COLUMN id SET DEFAULT nextval('chat_teams_id_seq'::regclass); + +ALTER TABLE ONLY ci_build_needs ALTER COLUMN id SET DEFAULT nextval('ci_build_needs_id_seq'::regclass); + +ALTER TABLE ONLY ci_build_pending_states ALTER COLUMN id SET DEFAULT nextval('ci_build_pending_states_id_seq'::regclass); + +ALTER TABLE ONLY ci_build_report_results ALTER COLUMN build_id SET DEFAULT nextval('ci_build_report_results_build_id_seq'::regclass); + +ALTER TABLE ONLY ci_build_trace_chunks ALTER COLUMN id SET DEFAULT nextval('ci_build_trace_chunks_id_seq'::regclass); + +ALTER TABLE ONLY ci_builds ALTER COLUMN id SET DEFAULT nextval('ci_builds_id_seq'::regclass); + +ALTER TABLE ONLY ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass); + +ALTER TABLE ONLY ci_builds_runner_session ALTER COLUMN id SET DEFAULT nextval('ci_builds_runner_session_id_seq'::regclass); + +ALTER TABLE ONLY ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('ci_daily_build_group_report_results_id_seq'::regclass); + +ALTER TABLE ONLY ci_deleted_objects ALTER COLUMN id SET DEFAULT nextval('ci_deleted_objects_id_seq'::regclass); + +ALTER TABLE ONLY ci_freeze_periods ALTER COLUMN id SET DEFAULT nextval('ci_freeze_periods_id_seq'::regclass); + +ALTER TABLE ONLY ci_group_variables ALTER COLUMN id SET DEFAULT nextval('ci_group_variables_id_seq'::regclass); + +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); + +ALTER TABLE ONLY ci_job_variables ALTER COLUMN id SET DEFAULT nextval('ci_job_variables_id_seq'::regclass); + +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); + +ALTER TABLE ONLY ci_pipeline_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_artifacts_id_seq'::regclass); -CREATE TABLE events ( - id_convert_to_bigint integer DEFAULT 0 NOT NULL, - project_id integer, - author_id integer NOT NULL, - target_id integer, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - action smallint NOT NULL, - target_type character varying, - group_id bigint, - fingerprint bytea, - id bigint NOT NULL, - CONSTRAINT check_97e06e05ad CHECK ((octet_length(fingerprint) <= 128)) -); +ALTER TABLE ONLY ci_pipeline_chat_data ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_chat_data_id_seq'::regclass); -CREATE SEQUENCE events_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_pipeline_messages ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_messages_id_seq'::regclass); -ALTER SEQUENCE events_id_seq OWNED BY events.id; +ALTER TABLE ONLY ci_pipeline_schedule_variables ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedule_variables_id_seq'::regclass); -CREATE TABLE evidences ( - id bigint NOT NULL, - release_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - summary_sha bytea, - summary jsonb DEFAULT '{}'::jsonb NOT NULL -); +ALTER TABLE ONLY ci_pipeline_schedules ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedules_id_seq'::regclass); -CREATE SEQUENCE evidences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_pipeline_variables ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_variables_id_seq'::regclass); -ALTER SEQUENCE evidences_id_seq OWNED BY evidences.id; +ALTER TABLE ONLY ci_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_pipelines_id_seq'::regclass); -CREATE TABLE experiment_subjects ( - id bigint NOT NULL, - experiment_id bigint NOT NULL, - user_id bigint, - project_id bigint, - variant smallint DEFAULT 0 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - converted_at timestamp with time zone, - context jsonb DEFAULT '{}'::jsonb NOT NULL, - namespace_id bigint, - CONSTRAINT check_f6411bc4b5 CHECK ((num_nonnulls(user_id, namespace_id, project_id) = 1)) -); +ALTER TABLE ONLY ci_pipelines_config ALTER COLUMN pipeline_id SET DEFAULT nextval('ci_pipelines_config_pipeline_id_seq'::regclass); -CREATE SEQUENCE experiment_subjects_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_platform_metrics ALTER COLUMN id SET DEFAULT nextval('ci_platform_metrics_id_seq'::regclass); -ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id; +ALTER TABLE ONLY ci_project_mirrors ALTER COLUMN id SET DEFAULT nextval('ci_project_mirrors_id_seq'::regclass); -CREATE TABLE experiment_users ( - id bigint NOT NULL, - experiment_id bigint NOT NULL, - user_id bigint NOT NULL, - group_type smallint DEFAULT 0 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - converted_at timestamp with time zone, - context jsonb DEFAULT '{}'::jsonb NOT NULL -); +ALTER TABLE ONLY ci_project_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_project_monthly_usages_id_seq'::regclass); -CREATE SEQUENCE experiment_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_refs ALTER COLUMN id SET DEFAULT nextval('ci_refs_id_seq'::regclass); -ALTER SEQUENCE experiment_users_id_seq OWNED BY experiment_users.id; +ALTER TABLE ONLY ci_resource_groups ALTER COLUMN id SET DEFAULT nextval('ci_resource_groups_id_seq'::regclass); -CREATE TABLE experiments ( - id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_e2dda25ed0 CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY ci_resources ALTER COLUMN id SET DEFAULT nextval('ci_resources_id_seq'::regclass); -CREATE SEQUENCE experiments_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_runner_namespaces ALTER COLUMN id SET DEFAULT nextval('ci_runner_namespaces_id_seq'::regclass); -ALTER SEQUENCE experiments_id_seq OWNED BY experiments.id; +ALTER TABLE ONLY ci_runner_projects ALTER COLUMN id SET DEFAULT nextval('ci_runner_projects_id_seq'::regclass); -CREATE TABLE external_approval_rules ( - 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, - external_url text NOT NULL, - name text NOT NULL, - CONSTRAINT check_1c64b53ea5 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_b634ca168d CHECK ((char_length(external_url) <= 255)) -); +ALTER TABLE ONLY ci_runners ALTER COLUMN id SET DEFAULT nextval('ci_runners_id_seq'::regclass); -CREATE SEQUENCE external_approval_rules_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_running_builds ALTER COLUMN id SET DEFAULT nextval('ci_running_builds_id_seq'::regclass); -ALTER SEQUENCE external_approval_rules_id_seq OWNED BY external_approval_rules.id; +ALTER TABLE ONLY ci_secure_files ALTER COLUMN id SET DEFAULT nextval('ci_secure_files_id_seq'::regclass); -CREATE TABLE external_approval_rules_protected_branches ( - id bigint NOT NULL, - external_approval_rule_id bigint NOT NULL, - protected_branch_id bigint NOT NULL -); +ALTER TABLE ONLY ci_sources_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_sources_pipelines_id_seq'::regclass); -CREATE SEQUENCE external_approval_rules_protected_branches_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_sources_projects ALTER COLUMN id SET DEFAULT nextval('ci_sources_projects_id_seq'::regclass); -ALTER SEQUENCE external_approval_rules_protected_branches_id_seq OWNED BY external_approval_rules_protected_branches.id; +ALTER TABLE ONLY ci_stages ALTER COLUMN id SET DEFAULT nextval('ci_stages_id_seq'::regclass); -CREATE TABLE external_pull_requests ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - pull_request_iid integer NOT NULL, - status smallint NOT NULL, - source_branch character varying(255) NOT NULL, - target_branch character varying(255) NOT NULL, - source_repository character varying(255) NOT NULL, - target_repository character varying(255) NOT NULL, - source_sha bytea NOT NULL, - target_sha bytea NOT NULL -); +ALTER TABLE ONLY ci_subscriptions_projects ALTER COLUMN id SET DEFAULT nextval('ci_subscriptions_projects_id_seq'::regclass); -CREATE SEQUENCE external_pull_requests_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_trigger_requests ALTER COLUMN id SET DEFAULT nextval('ci_trigger_requests_id_seq'::regclass); -ALTER SEQUENCE external_pull_requests_id_seq OWNED BY external_pull_requests.id; +ALTER TABLE ONLY ci_triggers ALTER COLUMN id SET DEFAULT nextval('ci_triggers_id_seq'::regclass); -CREATE TABLE external_status_checks ( - 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, - external_url text NOT NULL, - name text NOT NULL, - CONSTRAINT check_7e3b9eb41a CHECK ((char_length(name) <= 255)), - CONSTRAINT check_ae0dec3f61 CHECK ((char_length(external_url) <= 255)) -); +ALTER TABLE ONLY ci_unit_test_failures ALTER COLUMN id SET DEFAULT nextval('ci_unit_test_failures_id_seq'::regclass); -CREATE SEQUENCE external_status_checks_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_unit_tests ALTER COLUMN id SET DEFAULT nextval('ci_unit_tests_id_seq'::regclass); -ALTER SEQUENCE external_status_checks_id_seq OWNED BY external_status_checks.id; +ALTER TABLE ONLY ci_variables ALTER COLUMN id SET DEFAULT nextval('ci_variables_id_seq'::regclass); -CREATE TABLE external_status_checks_protected_branches ( - id bigint NOT NULL, - external_status_check_id bigint NOT NULL, - protected_branch_id bigint NOT NULL -); +ALTER TABLE ONLY cluster_agent_tokens ALTER COLUMN id SET DEFAULT nextval('cluster_agent_tokens_id_seq'::regclass); -CREATE SEQUENCE external_status_checks_protected_branches_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY cluster_agents ALTER COLUMN id SET DEFAULT nextval('cluster_agents_id_seq'::regclass); -ALTER SEQUENCE external_status_checks_protected_branches_id_seq OWNED BY external_status_checks_protected_branches.id; +ALTER TABLE ONLY cluster_groups ALTER COLUMN id SET DEFAULT nextval('cluster_groups_id_seq'::regclass); -CREATE TABLE feature_gates ( - id integer NOT NULL, - feature_key character varying NOT NULL, - key character varying NOT NULL, - value character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY cluster_platforms_kubernetes ALTER COLUMN id SET DEFAULT nextval('cluster_platforms_kubernetes_id_seq'::regclass); -CREATE SEQUENCE feature_gates_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY cluster_projects ALTER COLUMN id SET DEFAULT nextval('cluster_projects_id_seq'::regclass); -ALTER SEQUENCE feature_gates_id_seq OWNED BY feature_gates.id; +ALTER TABLE ONLY cluster_providers_aws ALTER COLUMN id SET DEFAULT nextval('cluster_providers_aws_id_seq'::regclass); -CREATE TABLE features ( - id integer NOT NULL, - key character varying NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY cluster_providers_gcp ALTER COLUMN id SET DEFAULT nextval('cluster_providers_gcp_id_seq'::regclass); -CREATE SEQUENCE features_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq'::regclass); -ALTER SEQUENCE features_id_seq OWNED BY features.id; +ALTER TABLE ONLY clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cert_managers_id_seq'::regclass); -CREATE TABLE fork_network_members ( - id integer NOT NULL, - fork_network_id integer NOT NULL, - project_id integer NOT NULL, - forked_from_project_id integer -); +ALTER TABLE ONLY clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cilium_id_seq'::regclass); -CREATE SEQUENCE fork_network_members_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('clusters_applications_crossplane_id_seq'::regclass); -ALTER SEQUENCE fork_network_members_id_seq OWNED BY fork_network_members.id; +ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass); -CREATE TABLE fork_networks ( - id integer NOT NULL, - root_project_id integer, - deleted_root_project_name character varying -); +ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass); + +ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass); + +ALTER TABLE ONLY clusters_applications_jupyter ALTER COLUMN id SET DEFAULT nextval('clusters_applications_jupyter_id_seq'::regclass); -CREATE SEQUENCE fork_networks_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_applications_knative ALTER COLUMN id SET DEFAULT nextval('clusters_applications_knative_id_seq'::regclass); -ALTER SEQUENCE fork_networks_id_seq OWNED BY fork_networks.id; +ALTER TABLE ONLY clusters_applications_prometheus ALTER COLUMN id SET DEFAULT nextval('clusters_applications_prometheus_id_seq'::regclass); -CREATE TABLE geo_cache_invalidation_events ( - id bigint NOT NULL, - key character varying NOT NULL -); +ALTER TABLE ONLY clusters_applications_runners ALTER COLUMN id SET DEFAULT nextval('clusters_applications_runners_id_seq'::regclass); -CREATE SEQUENCE geo_cache_invalidation_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER COLUMN id SET DEFAULT nextval('clusters_kubernetes_namespaces_id_seq'::regclass); -ALTER SEQUENCE geo_cache_invalidation_events_id_seq OWNED BY geo_cache_invalidation_events.id; +ALTER TABLE ONLY commit_user_mentions ALTER COLUMN id SET DEFAULT nextval('commit_user_mentions_id_seq'::regclass); -CREATE TABLE geo_container_repository_updated_events ( - id bigint NOT NULL, - container_repository_id integer NOT NULL -); +ALTER TABLE ONLY compliance_management_frameworks ALTER COLUMN id SET DEFAULT nextval('compliance_management_frameworks_id_seq'::regclass); -CREATE SEQUENCE geo_container_repository_updated_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY container_repositories ALTER COLUMN id SET DEFAULT nextval('container_repositories_id_seq'::regclass); -ALTER SEQUENCE geo_container_repository_updated_events_id_seq OWNED BY geo_container_repository_updated_events.id; +ALTER TABLE ONLY content_blocked_states ALTER COLUMN id SET DEFAULT nextval('content_blocked_states_id_seq'::regclass); -CREATE TABLE geo_event_log ( - id bigint NOT NULL, - created_at timestamp without time zone NOT NULL, - repository_updated_event_id bigint, - repository_deleted_event_id bigint, - repository_renamed_event_id bigint, - repositories_changed_event_id bigint, - repository_created_event_id bigint, - hashed_storage_migrated_event_id bigint, - lfs_object_deleted_event_id bigint, - hashed_storage_attachments_event_id bigint, - upload_deleted_event_id bigint, - job_artifact_deleted_event_id bigint, - reset_checksum_event_id bigint, - cache_invalidation_event_id bigint, - container_repository_updated_event_id bigint, - geo_event_id integer -); +ALTER TABLE ONLY conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('conversational_development_index_metrics_id_seq'::regclass); -CREATE SEQUENCE geo_event_log_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY coverage_fuzzing_corpuses ALTER COLUMN id SET DEFAULT nextval('coverage_fuzzing_corpuses_id_seq'::regclass); -ALTER SEQUENCE geo_event_log_id_seq OWNED BY geo_event_log.id; +ALTER TABLE ONLY csv_issue_imports ALTER COLUMN id SET DEFAULT nextval('csv_issue_imports_id_seq'::regclass); -CREATE TABLE geo_events ( - id bigint NOT NULL, - replicable_name character varying(255) NOT NULL, - event_name character varying(255) NOT NULL, - payload jsonb DEFAULT '{}'::jsonb NOT NULL, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY custom_emoji ALTER COLUMN id SET DEFAULT nextval('custom_emoji_id_seq'::regclass); -CREATE SEQUENCE geo_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval('customer_relations_contacts_id_seq'::regclass); -ALTER SEQUENCE geo_events_id_seq OWNED BY geo_events.id; +ALTER TABLE ONLY customer_relations_organizations ALTER COLUMN id SET DEFAULT nextval('customer_relations_organizations_id_seq'::regclass); -CREATE TABLE geo_hashed_storage_attachments_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - old_attachments_path text NOT NULL, - new_attachments_path text NOT NULL -); +ALTER TABLE ONLY dast_profile_schedules ALTER COLUMN id SET DEFAULT nextval('dast_profile_schedules_id_seq'::regclass); -CREATE SEQUENCE geo_hashed_storage_attachments_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_profiles ALTER COLUMN id SET DEFAULT nextval('dast_profiles_id_seq'::regclass); -ALTER SEQUENCE geo_hashed_storage_attachments_events_id_seq OWNED BY geo_hashed_storage_attachments_events.id; +ALTER TABLE ONLY dast_scanner_profiles ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_id_seq'::regclass); -CREATE TABLE geo_hashed_storage_migrated_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - repository_storage_name text NOT NULL, - old_disk_path text NOT NULL, - new_disk_path text NOT NULL, - old_wiki_disk_path text NOT NULL, - new_wiki_disk_path text NOT NULL, - old_storage_version smallint, - new_storage_version smallint NOT NULL, - old_design_disk_path text, - new_design_disk_path text -); +ALTER TABLE ONLY dast_site_profile_secret_variables ALTER COLUMN id SET DEFAULT nextval('dast_site_profile_secret_variables_id_seq'::regclass); -CREATE SEQUENCE geo_hashed_storage_migrated_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('dast_site_profiles_id_seq'::regclass); -ALTER SEQUENCE geo_hashed_storage_migrated_events_id_seq OWNED BY geo_hashed_storage_migrated_events.id; +ALTER TABLE ONLY dast_site_tokens ALTER COLUMN id SET DEFAULT nextval('dast_site_tokens_id_seq'::regclass); -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 -); +ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast_site_validations_id_seq'::regclass); -CREATE SEQUENCE geo_job_artifact_deleted_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass); -ALTER SEQUENCE geo_job_artifact_deleted_events_id_seq OWNED BY geo_job_artifact_deleted_events.id; +ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass); -CREATE TABLE geo_lfs_object_deleted_events ( - id bigint NOT NULL, - lfs_object_id integer NOT NULL, - oid character varying NOT NULL, - file_path character varying NOT NULL -); +ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass); -CREATE SEQUENCE geo_lfs_object_deleted_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dependency_proxy_manifests ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_manifests_id_seq'::regclass); -ALTER SEQUENCE geo_lfs_object_deleted_events_id_seq OWNED BY geo_lfs_object_deleted_events.id; +ALTER TABLE ONLY deploy_keys_projects ALTER COLUMN id SET DEFAULT nextval('deploy_keys_projects_id_seq'::regclass); -CREATE TABLE geo_node_namespace_links ( - id integer NOT NULL, - geo_node_id integer NOT NULL, - namespace_id integer NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY deploy_tokens ALTER COLUMN id SET DEFAULT nextval('deploy_tokens_id_seq'::regclass); -CREATE SEQUENCE geo_node_namespace_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY deployment_approvals ALTER COLUMN id SET DEFAULT nextval('deployment_approvals_id_seq'::regclass); -ALTER SEQUENCE geo_node_namespace_links_id_seq OWNED BY geo_node_namespace_links.id; +ALTER TABLE ONLY deployments ALTER COLUMN id SET DEFAULT nextval('deployments_id_seq'::regclass); -CREATE TABLE geo_node_statuses ( - id integer NOT NULL, - geo_node_id integer NOT NULL, - db_replication_lag_seconds integer, - repositories_synced_count integer, - repositories_failed_count integer, - 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, - cursor_last_event_date timestamp without time zone, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - last_successful_status_check_at timestamp without time zone, - status_message character varying, - replication_slots_count integer, - replication_slots_used_count integer, - replication_slots_max_retained_wal_bytes bigint, - wikis_synced_count integer, - wikis_failed_count integer, - job_artifacts_count integer, - job_artifacts_synced_count integer, - job_artifacts_failed_count integer, - version character varying, - revision character varying, - repositories_verified_count integer, - repositories_verification_failed_count integer, - wikis_verified_count integer, - 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, - wikis_checksummed_count integer, - wikis_checksum_failed_count integer, - wikis_checksum_mismatch_count integer, - storage_configuration_digest bytea, - repositories_retrying_verification_count integer, - wikis_retrying_verification_count integer, - projects_count integer, - container_repositories_count integer, - container_repositories_synced_count integer, - container_repositories_failed_count integer, - container_repositories_registry_count integer, - design_repositories_count integer, - design_repositories_synced_count integer, - design_repositories_failed_count integer, - design_repositories_registry_count integer, - status jsonb DEFAULT '{}'::jsonb NOT NULL -); +ALTER TABLE ONLY description_versions ALTER COLUMN id SET DEFAULT nextval('description_versions_id_seq'::regclass); -CREATE SEQUENCE geo_node_statuses_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY design_management_designs ALTER COLUMN id SET DEFAULT nextval('design_management_designs_id_seq'::regclass); -ALTER SEQUENCE geo_node_statuses_id_seq OWNED BY geo_node_statuses.id; +ALTER TABLE ONLY design_management_designs_versions ALTER COLUMN id SET DEFAULT nextval('design_management_designs_versions_id_seq'::regclass); -CREATE TABLE geo_nodes ( - id integer NOT NULL, - "primary" boolean DEFAULT false NOT NULL, - oauth_application_id integer, - enabled boolean DEFAULT true NOT NULL, - access_key character varying, - encrypted_secret_access_key character varying, - encrypted_secret_access_key_iv character varying, - clone_url_prefix character varying, - files_max_capacity integer DEFAULT 10 NOT NULL, - repos_max_capacity integer DEFAULT 25 NOT NULL, - url character varying NOT NULL, - selective_sync_type character varying, - selective_sync_shards text, - verification_max_capacity integer DEFAULT 100 NOT NULL, - minimum_reverification_interval integer DEFAULT 7 NOT NULL, - internal_url character varying, - name character varying NOT NULL, - container_repositories_max_capacity integer DEFAULT 10 NOT NULL, - sync_object_storage boolean DEFAULT false NOT NULL, - created_at timestamp with time zone, - updated_at timestamp with time zone -); +ALTER TABLE ONLY design_management_versions ALTER COLUMN id SET DEFAULT nextval('design_management_versions_id_seq'::regclass); -CREATE SEQUENCE geo_nodes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY design_user_mentions ALTER COLUMN id SET DEFAULT nextval('design_user_mentions_id_seq'::regclass); -ALTER SEQUENCE geo_nodes_id_seq OWNED BY geo_nodes.id; +ALTER TABLE ONLY detached_partitions ALTER COLUMN id SET DEFAULT nextval('detached_partitions_id_seq'::regclass); -CREATE TABLE geo_repositories_changed_events ( - id bigint NOT NULL, - geo_node_id integer NOT NULL -); +ALTER TABLE ONLY diff_note_positions ALTER COLUMN id SET DEFAULT nextval('diff_note_positions_id_seq'::regclass); -CREATE SEQUENCE geo_repositories_changed_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dora_daily_metrics ALTER COLUMN id SET DEFAULT nextval('dora_daily_metrics_id_seq'::regclass); -ALTER SEQUENCE geo_repositories_changed_events_id_seq OWNED BY geo_repositories_changed_events.id; +ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass); -CREATE TABLE geo_repository_created_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - repository_storage_name text NOT NULL, - repo_path text NOT NULL, - wiki_path text, - project_name text NOT NULL -); +ALTER TABLE ONLY elastic_index_settings ALTER COLUMN id SET DEFAULT nextval('elastic_index_settings_id_seq'::regclass); -CREATE SEQUENCE geo_repository_created_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY elastic_reindexing_slices ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_slices_id_seq'::regclass); -ALTER SEQUENCE geo_repository_created_events_id_seq OWNED BY geo_repository_created_events.id; +ALTER TABLE ONLY elastic_reindexing_subtasks ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_subtasks_id_seq'::regclass); -CREATE TABLE geo_repository_deleted_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - repository_storage_name text NOT NULL, - deleted_path text NOT NULL, - deleted_wiki_path text, - deleted_project_name text NOT NULL -); +ALTER TABLE ONLY elastic_reindexing_tasks ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_tasks_id_seq'::regclass); -CREATE SEQUENCE geo_repository_deleted_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY emails ALTER COLUMN id SET DEFAULT nextval('emails_id_seq'::regclass); -ALTER SEQUENCE geo_repository_deleted_events_id_seq OWNED BY geo_repository_deleted_events.id; +ALTER TABLE ONLY environments ALTER COLUMN id SET DEFAULT nextval('environments_id_seq'::regclass); -CREATE TABLE geo_repository_renamed_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - repository_storage_name text NOT NULL, - old_path_with_namespace text NOT NULL, - new_path_with_namespace text NOT NULL, - old_wiki_path_with_namespace text NOT NULL, - new_wiki_path_with_namespace text NOT NULL, - old_path text NOT NULL, - new_path text NOT NULL -); +ALTER TABLE ONLY epic_issues ALTER COLUMN id SET DEFAULT nextval('epic_issues_id_seq'::regclass); -CREATE SEQUENCE geo_repository_renamed_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY epic_metrics ALTER COLUMN id SET DEFAULT nextval('epic_metrics_id_seq'::regclass); -ALTER SEQUENCE geo_repository_renamed_events_id_seq OWNED BY geo_repository_renamed_events.id; +ALTER TABLE ONLY epic_user_mentions ALTER COLUMN id SET DEFAULT nextval('epic_user_mentions_id_seq'::regclass); -CREATE TABLE geo_repository_updated_events ( - id bigint NOT NULL, - branches_affected integer NOT NULL, - tags_affected integer NOT NULL, - project_id integer NOT NULL, - source smallint NOT NULL, - new_branch boolean DEFAULT false NOT NULL, - remove_branch boolean DEFAULT false NOT NULL, - ref text -); +ALTER TABLE ONLY epics ALTER COLUMN id SET DEFAULT nextval('epics_id_seq'::regclass); -CREATE SEQUENCE geo_repository_updated_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY error_tracking_client_keys ALTER COLUMN id SET DEFAULT nextval('error_tracking_client_keys_id_seq'::regclass); -ALTER SEQUENCE geo_repository_updated_events_id_seq OWNED BY geo_repository_updated_events.id; +ALTER TABLE ONLY error_tracking_error_events ALTER COLUMN id SET DEFAULT nextval('error_tracking_error_events_id_seq'::regclass); -CREATE TABLE geo_reset_checksum_events ( - id bigint NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY error_tracking_errors ALTER COLUMN id SET DEFAULT nextval('error_tracking_errors_id_seq'::regclass); -CREATE SEQUENCE geo_reset_checksum_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::regclass); -ALTER SEQUENCE geo_reset_checksum_events_id_seq OWNED BY geo_reset_checksum_events.id; +ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq'::regclass); -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 -); +ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass); -CREATE SEQUENCE geo_upload_deleted_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY experiment_users ALTER COLUMN id SET DEFAULT nextval('experiment_users_id_seq'::regclass); -ALTER SEQUENCE geo_upload_deleted_events_id_seq OWNED BY geo_upload_deleted_events.id; +ALTER TABLE ONLY experiments ALTER COLUMN id SET DEFAULT nextval('experiments_id_seq'::regclass); -CREATE TABLE gitlab_subscription_histories ( - id bigint NOT NULL, - gitlab_subscription_created_at timestamp with time zone, - gitlab_subscription_updated_at timestamp with time zone, - start_date date, - end_date date, - trial_ends_on date, - namespace_id integer, - hosted_plan_id integer, - max_seats_used integer, - seats integer, - trial boolean, - change_type smallint, - gitlab_subscription_id bigint NOT NULL, - created_at timestamp with time zone, - trial_starts_on date, - auto_renew boolean, - trial_extension_type smallint -); +ALTER TABLE ONLY external_approval_rules ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_id_seq'::regclass); -CREATE SEQUENCE gitlab_subscription_histories_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY external_approval_rules_protected_branches ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_protected_branches_id_seq'::regclass); -ALTER SEQUENCE gitlab_subscription_histories_id_seq OWNED BY gitlab_subscription_histories.id; +ALTER TABLE ONLY external_pull_requests ALTER COLUMN id SET DEFAULT nextval('external_pull_requests_id_seq'::regclass); -CREATE TABLE gitlab_subscriptions ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - start_date date, - end_date date, - trial_ends_on date, - namespace_id integer, - hosted_plan_id integer, - max_seats_used integer DEFAULT 0, - seats integer DEFAULT 0, - trial boolean DEFAULT false, - trial_starts_on date, - auto_renew boolean, - seats_in_use integer DEFAULT 0 NOT NULL, - seats_owed integer DEFAULT 0 NOT NULL, - trial_extension_type smallint, - CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL)) -); +ALTER TABLE ONLY external_status_checks ALTER COLUMN id SET DEFAULT nextval('external_status_checks_id_seq'::regclass); -CREATE SEQUENCE gitlab_subscriptions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY external_status_checks_protected_branches ALTER COLUMN id SET DEFAULT nextval('external_status_checks_protected_branches_id_seq'::regclass); -ALTER SEQUENCE gitlab_subscriptions_id_seq OWNED BY gitlab_subscriptions.id; +ALTER TABLE ONLY feature_gates ALTER COLUMN id SET DEFAULT nextval('feature_gates_id_seq'::regclass); -CREATE TABLE gpg_key_subkeys ( - id integer NOT NULL, - gpg_key_id integer NOT NULL, - keyid bytea, - fingerprint bytea -); +ALTER TABLE ONLY features ALTER COLUMN id SET DEFAULT nextval('features_id_seq'::regclass); -CREATE SEQUENCE gpg_key_subkeys_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY fork_network_members ALTER COLUMN id SET DEFAULT nextval('fork_network_members_id_seq'::regclass); -ALTER SEQUENCE gpg_key_subkeys_id_seq OWNED BY gpg_key_subkeys.id; +ALTER TABLE ONLY fork_networks ALTER COLUMN id SET DEFAULT nextval('fork_networks_id_seq'::regclass); -CREATE TABLE gpg_keys ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id integer, - primary_keyid bytea, - fingerprint bytea, - key text -); +ALTER TABLE ONLY geo_cache_invalidation_events ALTER COLUMN id SET DEFAULT nextval('geo_cache_invalidation_events_id_seq'::regclass); -CREATE SEQUENCE gpg_keys_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_container_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_container_repository_updated_events_id_seq'::regclass); -ALTER SEQUENCE gpg_keys_id_seq OWNED BY gpg_keys.id; +ALTER TABLE ONLY geo_event_log ALTER COLUMN id SET DEFAULT nextval('geo_event_log_id_seq'::regclass); -CREATE TABLE gpg_signatures ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer, - gpg_key_id integer, - commit_sha bytea, - gpg_key_primary_keyid bytea, - gpg_key_user_name text, - gpg_key_user_email text, - verification_status smallint DEFAULT 0 NOT NULL, - gpg_key_subkey_id integer -); +ALTER TABLE ONLY geo_events ALTER COLUMN id SET DEFAULT nextval('geo_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_hashed_storage_attachments_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_attachments_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_hashed_storage_migrated_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_migrated_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_job_artifact_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_job_artifact_deleted_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_lfs_object_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_lfs_object_deleted_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_node_namespace_links ALTER COLUMN id SET DEFAULT nextval('geo_node_namespace_links_id_seq'::regclass); + +ALTER TABLE ONLY geo_node_statuses ALTER COLUMN id SET DEFAULT nextval('geo_node_statuses_id_seq'::regclass); + +ALTER TABLE ONLY geo_nodes ALTER COLUMN id SET DEFAULT nextval('geo_nodes_id_seq'::regclass); + +ALTER TABLE ONLY geo_repositories_changed_events ALTER COLUMN id SET DEFAULT nextval('geo_repositories_changed_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_repository_created_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_created_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_repository_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_deleted_events_id_seq'::regclass); + +ALTER TABLE ONLY geo_repository_renamed_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_renamed_events_id_seq'::regclass); -CREATE SEQUENCE gpg_signatures_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_updated_events_id_seq'::regclass); -ALTER SEQUENCE gpg_signatures_id_seq OWNED BY gpg_signatures.id; +ALTER TABLE ONLY geo_reset_checksum_events ALTER COLUMN id SET DEFAULT nextval('geo_reset_checksum_events_id_seq'::regclass); -CREATE TABLE grafana_integrations ( - 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, - encrypted_token character varying(255) NOT NULL, - encrypted_token_iv character varying(255) NOT NULL, - grafana_url character varying(1024) NOT NULL, - enabled boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY gitlab_subscription_histories ALTER COLUMN id SET DEFAULT nextval('gitlab_subscription_histories_id_seq'::regclass); -CREATE SEQUENCE grafana_integrations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_subscriptions ALTER COLUMN id SET DEFAULT nextval('gitlab_subscriptions_id_seq'::regclass); -ALTER SEQUENCE grafana_integrations_id_seq OWNED BY grafana_integrations.id; +ALTER TABLE ONLY gpg_key_subkeys ALTER COLUMN id SET DEFAULT nextval('gpg_key_subkeys_id_seq'::regclass); -CREATE TABLE group_custom_attributes ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id integer NOT NULL, - key character varying NOT NULL, - value character varying NOT NULL -); +ALTER TABLE ONLY gpg_keys ALTER COLUMN id SET DEFAULT nextval('gpg_keys_id_seq'::regclass); -CREATE SEQUENCE group_custom_attributes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gpg_signatures ALTER COLUMN id SET DEFAULT nextval('gpg_signatures_id_seq'::regclass); -ALTER SEQUENCE group_custom_attributes_id_seq OWNED BY group_custom_attributes.id; +ALTER TABLE ONLY grafana_integrations ALTER COLUMN id SET DEFAULT nextval('grafana_integrations_id_seq'::regclass); -CREATE TABLE group_deletion_schedules ( - group_id bigint NOT NULL, - user_id bigint NOT NULL, - marked_for_deletion_on date NOT NULL -); +ALTER TABLE ONLY group_crm_settings ALTER COLUMN group_id SET DEFAULT nextval('group_crm_settings_group_id_seq'::regclass); -CREATE TABLE group_deploy_keys ( - id bigint NOT NULL, - user_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - last_used_at timestamp with time zone, - expires_at timestamp with time zone, - key text NOT NULL, - title text, - fingerprint text NOT NULL, - fingerprint_sha256 bytea, - CONSTRAINT check_cc0365908d CHECK ((char_length(title) <= 255)), - CONSTRAINT check_e4526dcf91 CHECK ((char_length(fingerprint) <= 255)), - CONSTRAINT check_f58fa0a0f7 CHECK ((char_length(key) <= 4096)) -); +ALTER TABLE ONLY group_custom_attributes ALTER COLUMN id SET DEFAULT nextval('group_custom_attributes_id_seq'::regclass); -CREATE TABLE group_deploy_keys_groups ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - group_deploy_key_id bigint NOT NULL, - can_push boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY group_deploy_keys ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_id_seq'::regclass); -CREATE SEQUENCE group_deploy_keys_groups_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY group_deploy_keys_groups ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_groups_id_seq'::regclass); -ALTER SEQUENCE group_deploy_keys_groups_id_seq OWNED BY group_deploy_keys_groups.id; +ALTER TABLE ONLY group_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('group_deploy_tokens_id_seq'::regclass); -CREATE SEQUENCE group_deploy_keys_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY group_group_links ALTER COLUMN id SET DEFAULT nextval('group_group_links_id_seq'::regclass); -ALTER SEQUENCE group_deploy_keys_id_seq OWNED BY group_deploy_keys.id; +ALTER TABLE ONLY group_import_states ALTER COLUMN group_id SET DEFAULT nextval('group_import_states_group_id_seq'::regclass); -CREATE TABLE group_deploy_tokens ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - deploy_token_id bigint NOT NULL -); +ALTER TABLE ONLY group_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('group_repository_storage_moves_id_seq'::regclass); -CREATE SEQUENCE group_deploy_tokens_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY historical_data ALTER COLUMN id SET DEFAULT nextval('historical_data_id_seq'::regclass); -ALTER SEQUENCE group_deploy_tokens_id_seq OWNED BY group_deploy_tokens.id; +ALTER TABLE ONLY identities ALTER COLUMN id SET DEFAULT nextval('identities_id_seq'::regclass); -CREATE TABLE group_group_links ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - shared_group_id bigint NOT NULL, - shared_with_group_id bigint NOT NULL, - expires_at date, - group_access smallint DEFAULT 30 NOT NULL -); +ALTER TABLE ONLY import_export_uploads ALTER COLUMN id SET DEFAULT nextval('import_export_uploads_id_seq'::regclass); -CREATE SEQUENCE group_group_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY import_failures ALTER COLUMN id SET DEFAULT nextval('import_failures_id_seq'::regclass); -ALTER SEQUENCE group_group_links_id_seq OWNED BY group_group_links.id; +ALTER TABLE ONLY in_product_marketing_emails ALTER COLUMN id SET DEFAULT nextval('in_product_marketing_emails_id_seq'::regclass); -CREATE TABLE group_import_states ( - group_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status smallint DEFAULT 0 NOT NULL, - jid text, - last_error text, - user_id bigint, - CONSTRAINT check_87b58f6b30 CHECK ((char_length(last_error) <= 255)), - CONSTRAINT check_96558fff96 CHECK ((char_length(jid) <= 100)) -); +ALTER TABLE ONLY incident_management_escalation_policies ALTER COLUMN id SET DEFAULT nextval('incident_management_escalation_policies_id_seq'::regclass); -CREATE SEQUENCE group_import_states_group_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_escalation_rules ALTER COLUMN id SET DEFAULT nextval('incident_management_escalation_rules_id_seq'::regclass); -ALTER SEQUENCE group_import_states_group_id_seq OWNED BY group_import_states.group_id; +ALTER TABLE ONLY incident_management_issuable_escalation_statuses ALTER COLUMN id SET DEFAULT nextval('incident_management_issuable_escalation_statuses_id_seq'::regclass); -CREATE TABLE group_merge_request_approval_settings ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - allow_author_approval boolean DEFAULT false NOT NULL, - allow_committer_approval boolean DEFAULT false NOT NULL, - allow_overrides_to_approver_list_per_merge_request boolean DEFAULT false NOT NULL, - retain_approvals_on_push boolean DEFAULT false NOT NULL, - require_password_to_approve boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY incident_management_oncall_participants ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_participants_id_seq'::regclass); -CREATE TABLE group_repository_storage_moves ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - state smallint DEFAULT 1 NOT NULL, - source_storage_name text NOT NULL, - destination_storage_name text NOT NULL, - CONSTRAINT group_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), - CONSTRAINT group_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) -); +ALTER TABLE ONLY incident_management_oncall_rotations ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_rotations_id_seq'::regclass); -CREATE SEQUENCE group_repository_storage_moves_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_oncall_schedules ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_schedules_id_seq'::regclass); -ALTER SEQUENCE group_repository_storage_moves_id_seq OWNED BY group_repository_storage_moves.id; +ALTER TABLE ONLY incident_management_oncall_shifts ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_shifts_id_seq'::regclass); -CREATE TABLE group_wiki_repositories ( - shard_id bigint NOT NULL, - group_id bigint NOT NULL, - disk_path text NOT NULL, - CONSTRAINT check_07f1c81806 CHECK ((char_length(disk_path) <= 80)) -); +ALTER TABLE ONLY incident_management_pending_alert_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass); -CREATE TABLE historical_data ( - id integer NOT NULL, - date date, - active_user_count integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - recorded_at timestamp with time zone, - CONSTRAINT check_640e8cf66c CHECK ((recorded_at IS NOT NULL)) -); +ALTER TABLE ONLY incident_management_pending_issue_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass); -CREATE SEQUENCE historical_data_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_timeline_events ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_events_id_seq'::regclass); -ALTER SEQUENCE historical_data_id_seq OWNED BY historical_data.id; +ALTER TABLE ONLY index_statuses ALTER COLUMN id SET DEFAULT nextval('index_statuses_id_seq'::regclass); -CREATE TABLE identities ( - id integer NOT NULL, - extern_uid character varying, - provider character varying, - user_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - saml_provider_id integer, - secondary_extern_uid character varying -); +ALTER TABLE ONLY insights ALTER COLUMN id SET DEFAULT nextval('insights_id_seq'::regclass); -CREATE SEQUENCE identities_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY integrations ALTER COLUMN id SET DEFAULT nextval('integrations_id_seq'::regclass); -ALTER SEQUENCE identities_id_seq OWNED BY identities.id; +ALTER TABLE ONLY internal_ids ALTER COLUMN id SET DEFAULT nextval('internal_ids_id_seq'::regclass); -CREATE TABLE import_export_uploads ( - id integer NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer, - import_file text, - export_file text, - group_id bigint, - remote_import_url text, - CONSTRAINT check_58f0d37481 CHECK ((char_length(remote_import_url) <= 512)) -); +ALTER TABLE ONLY ip_restrictions ALTER COLUMN id SET DEFAULT nextval('ip_restrictions_id_seq'::regclass); -CREATE SEQUENCE import_export_uploads_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issuable_metric_images ALTER COLUMN id SET DEFAULT nextval('issuable_metric_images_id_seq'::regclass); + +ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuable_severities_id_seq'::regclass); + +ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass); -ALTER SEQUENCE import_export_uploads_id_seq OWNED BY import_export_uploads.id; +ALTER TABLE ONLY issue_customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval('issue_customer_relations_contacts_id_seq'::regclass); -CREATE TABLE import_failures ( - id bigint NOT NULL, - relation_index integer, - project_id bigint, - created_at timestamp with time zone NOT NULL, - relation_key character varying(64), - exception_class character varying(128), - correlation_id_value character varying(128), - exception_message character varying(255), - retry_count integer, - group_id integer, - source character varying(128) -); +ALTER TABLE ONLY issue_email_participants ALTER COLUMN id SET DEFAULT nextval('issue_email_participants_id_seq'::regclass); -CREATE SEQUENCE import_failures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issue_emails ALTER COLUMN id SET DEFAULT nextval('issue_emails_id_seq'::regclass); -ALTER SEQUENCE import_failures_id_seq OWNED BY import_failures.id; +ALTER TABLE ONLY issue_links ALTER COLUMN id SET DEFAULT nextval('issue_links_id_seq'::regclass); -CREATE TABLE in_product_marketing_emails ( - id bigint NOT NULL, - user_id bigint NOT NULL, - cta_clicked_at timestamp with time zone, - track smallint NOT NULL, - series smallint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY issue_metrics ALTER COLUMN id SET DEFAULT nextval('issue_metrics_id_seq'::regclass); -CREATE SEQUENCE in_product_marketing_emails_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issue_tracker_data ALTER COLUMN id SET DEFAULT nextval('issue_tracker_data_id_seq'::regclass); -ALTER SEQUENCE in_product_marketing_emails_id_seq OWNED BY in_product_marketing_emails.id; +ALTER TABLE ONLY issue_user_mentions ALTER COLUMN id SET DEFAULT nextval('issue_user_mentions_id_seq'::regclass); -CREATE TABLE incident_management_escalation_policies ( - id bigint NOT NULL, - project_id bigint NOT NULL, - name text NOT NULL, - description text, - CONSTRAINT check_510b2a5258 CHECK ((char_length(description) <= 160)), - CONSTRAINT check_9a26365850 CHECK ((char_length(name) <= 72)) -); +ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass); -CREATE SEQUENCE incident_management_escalation_policies_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY iterations_cadences ALTER COLUMN id SET DEFAULT nextval('iterations_cadences_id_seq'::regclass); -ALTER SEQUENCE incident_management_escalation_policies_id_seq OWNED BY incident_management_escalation_policies.id; +ALTER TABLE ONLY jira_connect_installations ALTER COLUMN id SET DEFAULT nextval('jira_connect_installations_id_seq'::regclass); -CREATE TABLE incident_management_escalation_rules ( - id bigint NOT NULL, - policy_id bigint NOT NULL, - oncall_schedule_id bigint, - status smallint NOT NULL, - elapsed_time_seconds integer NOT NULL, - is_removed boolean DEFAULT false NOT NULL, - user_id bigint, - CONSTRAINT escalation_rules_one_of_oncall_schedule_or_user CHECK ((num_nonnulls(oncall_schedule_id, user_id) = 1)) -); +ALTER TABLE ONLY jira_connect_subscriptions ALTER COLUMN id SET DEFAULT nextval('jira_connect_subscriptions_id_seq'::regclass); -CREATE SEQUENCE incident_management_escalation_rules_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY jira_imports ALTER COLUMN id SET DEFAULT nextval('jira_imports_id_seq'::regclass); -ALTER SEQUENCE incident_management_escalation_rules_id_seq OWNED BY incident_management_escalation_rules.id; +ALTER TABLE ONLY jira_tracker_data ALTER COLUMN id SET DEFAULT nextval('jira_tracker_data_id_seq'::regclass); -CREATE TABLE incident_management_issuable_escalation_statuses ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - issue_id bigint NOT NULL, - policy_id bigint, - escalations_started_at timestamp with time zone, - resolved_at timestamp with time zone, - status smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY keys ALTER COLUMN id SET DEFAULT nextval('keys_id_seq'::regclass); -CREATE SEQUENCE incident_management_issuable_escalation_statuses_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY label_links ALTER COLUMN id SET DEFAULT nextval('label_links_id_seq'::regclass); -ALTER SEQUENCE incident_management_issuable_escalation_statuses_id_seq OWNED BY incident_management_issuable_escalation_statuses.id; +ALTER TABLE ONLY label_priorities ALTER COLUMN id SET DEFAULT nextval('label_priorities_id_seq'::regclass); -CREATE TABLE incident_management_oncall_participants ( - id bigint NOT NULL, - oncall_rotation_id bigint NOT NULL, - user_id bigint NOT NULL, - color_palette smallint NOT NULL, - color_weight smallint NOT NULL, - is_removed boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY labels ALTER COLUMN id SET DEFAULT nextval('labels_id_seq'::regclass); -CREATE SEQUENCE incident_management_oncall_participants_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ldap_group_links ALTER COLUMN id SET DEFAULT nextval('ldap_group_links_id_seq'::regclass); -ALTER SEQUENCE incident_management_oncall_participants_id_seq OWNED BY incident_management_oncall_participants.id; +ALTER TABLE ONLY lfs_file_locks ALTER COLUMN id SET DEFAULT nextval('lfs_file_locks_id_seq'::regclass); -CREATE TABLE incident_management_oncall_rotations ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - oncall_schedule_id bigint NOT NULL, - length integer NOT NULL, - length_unit smallint NOT NULL, - starts_at timestamp with time zone NOT NULL, - name text NOT NULL, - active_period_start time without time zone, - active_period_end time without time zone, - ends_at timestamp with time zone, - CONSTRAINT check_5209fb5d02 CHECK ((char_length(name) <= 200)) -); +ALTER TABLE ONLY lfs_object_states ALTER COLUMN lfs_object_id SET DEFAULT nextval('lfs_object_states_lfs_object_id_seq'::regclass); -CREATE SEQUENCE incident_management_oncall_rotations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY lfs_objects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_id_seq'::regclass); -ALTER SEQUENCE incident_management_oncall_rotations_id_seq OWNED BY incident_management_oncall_rotations.id; +ALTER TABLE ONLY lfs_objects_projects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_projects_id_seq'::regclass); -CREATE TABLE incident_management_oncall_schedules ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - iid integer NOT NULL, - name text NOT NULL, - description text, - timezone text, - CONSTRAINT check_7ed1fd5aa7 CHECK ((char_length(description) <= 1000)), - CONSTRAINT check_cc77cbb103 CHECK ((char_length(timezone) <= 100)), - CONSTRAINT check_e6ef43a664 CHECK ((char_length(name) <= 200)) -); +ALTER TABLE ONLY licenses ALTER COLUMN id SET DEFAULT nextval('licenses_id_seq'::regclass); -CREATE SEQUENCE incident_management_oncall_schedules_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY list_user_preferences ALTER COLUMN id SET DEFAULT nextval('list_user_preferences_id_seq'::regclass); -ALTER SEQUENCE incident_management_oncall_schedules_id_seq OWNED BY incident_management_oncall_schedules.id; +ALTER TABLE ONLY lists ALTER COLUMN id SET DEFAULT nextval('lists_id_seq'::regclass); -CREATE TABLE incident_management_oncall_shifts ( - id bigint NOT NULL, - rotation_id bigint NOT NULL, - participant_id bigint NOT NULL, - starts_at timestamp with time zone NOT NULL, - ends_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY loose_foreign_keys_deleted_records ALTER COLUMN id SET DEFAULT nextval('loose_foreign_keys_deleted_records_id_seq'::regclass); -CREATE SEQUENCE incident_management_oncall_shifts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY member_tasks ALTER COLUMN id SET DEFAULT nextval('member_tasks_id_seq'::regclass); -ALTER SEQUENCE incident_management_oncall_shifts_id_seq OWNED BY incident_management_oncall_shifts.id; +ALTER TABLE ONLY members ALTER COLUMN id SET DEFAULT nextval('members_id_seq'::regclass); -CREATE TABLE index_statuses ( - id integer NOT NULL, - project_id integer NOT NULL, - indexed_at timestamp without time zone, - note text, - last_commit character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - last_wiki_commit bytea, - wiki_indexed_at timestamp with time zone -); +ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('merge_request_assignees_id_seq'::regclass); -CREATE SEQUENCE index_statuses_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_request_blocks ALTER COLUMN id SET DEFAULT nextval('merge_request_blocks_id_seq'::regclass); -ALTER SEQUENCE index_statuses_id_seq OWNED BY index_statuses.id; +ALTER TABLE ONLY merge_request_cleanup_schedules ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_cleanup_schedules_merge_request_id_seq'::regclass); -CREATE TABLE insights ( - id integer NOT NULL, - namespace_id integer NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY merge_request_context_commits ALTER COLUMN id SET DEFAULT nextval('merge_request_context_commits_id_seq'::regclass); -CREATE SEQUENCE insights_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_request_diff_commit_users ALTER COLUMN id SET DEFAULT nextval('merge_request_diff_commit_users_id_seq'::regclass); -ALTER SEQUENCE insights_id_seq OWNED BY insights.id; +ALTER TABLE ONLY merge_request_diff_details ALTER COLUMN merge_request_diff_id SET DEFAULT nextval('merge_request_diff_details_merge_request_diff_id_seq'::regclass); -CREATE TABLE integrations ( - id integer NOT NULL, - type character varying, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - active boolean DEFAULT false NOT NULL, - properties text, - template boolean DEFAULT false, - push_events boolean DEFAULT true, - issues_events boolean DEFAULT true, - merge_requests_events boolean DEFAULT true, - tag_push_events boolean DEFAULT true, - note_events boolean DEFAULT true NOT NULL, - category character varying DEFAULT 'common'::character varying NOT NULL, - wiki_page_events boolean DEFAULT true, - pipeline_events boolean DEFAULT false NOT NULL, - confidential_issues_events boolean DEFAULT true NOT NULL, - commit_events boolean DEFAULT true NOT NULL, - job_events boolean DEFAULT false NOT NULL, - confidential_note_events boolean DEFAULT true, - deployment_events boolean DEFAULT false NOT NULL, - comment_on_event_enabled boolean DEFAULT true NOT NULL, - instance boolean DEFAULT false NOT NULL, - comment_detail smallint, - inherit_from_id bigint, - alert_events boolean, - group_id bigint, - vulnerability_events boolean DEFAULT false NOT NULL, - type_new text, - CONSTRAINT check_a948a0aa7e CHECK ((char_length(type_new) <= 255)) -); +ALTER TABLE ONLY merge_request_diffs ALTER COLUMN id SET DEFAULT nextval('merge_request_diffs_id_seq'::regclass); + +ALTER TABLE ONLY merge_request_metrics ALTER COLUMN id SET DEFAULT nextval('merge_request_metrics_id_seq'::regclass); + +ALTER TABLE ONLY merge_request_reviewers ALTER COLUMN id SET DEFAULT nextval('merge_request_reviewers_id_seq'::regclass); + +ALTER TABLE ONLY merge_request_user_mentions ALTER COLUMN id SET DEFAULT nextval('merge_request_user_mentions_id_seq'::regclass); -CREATE SEQUENCE integrations_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_requests ALTER COLUMN id SET DEFAULT nextval('merge_requests_id_seq'::regclass); -ALTER SEQUENCE integrations_id_seq OWNED BY integrations.id; +ALTER TABLE ONLY merge_requests_closing_issues ALTER COLUMN id SET DEFAULT nextval('merge_requests_closing_issues_id_seq'::regclass); -CREATE TABLE internal_ids ( - id bigint NOT NULL, - project_id integer, - usage integer NOT NULL, - last_value integer NOT NULL, - namespace_id integer -); +ALTER TABLE ONLY merge_requests_compliance_violations ALTER COLUMN id SET DEFAULT nextval('merge_requests_compliance_violations_id_seq'::regclass); -CREATE SEQUENCE internal_ids_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_trains ALTER COLUMN id SET DEFAULT nextval('merge_trains_id_seq'::regclass); -ALTER SEQUENCE internal_ids_id_seq OWNED BY internal_ids.id; +ALTER TABLE ONLY metrics_dashboard_annotations ALTER COLUMN id SET DEFAULT nextval('metrics_dashboard_annotations_id_seq'::regclass); -CREATE TABLE ip_restrictions ( - id bigint NOT NULL, - group_id integer NOT NULL, - range character varying NOT NULL -); +ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT nextval('metrics_users_starred_dashboards_id_seq'::regclass); -CREATE SEQUENCE ip_restrictions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass); -ALTER SEQUENCE ip_restrictions_id_seq OWNED BY ip_restrictions.id; +ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('namespace_admin_notes_id_seq'::regclass); -CREATE TABLE issuable_metric_images ( - 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, - file_store smallint, - file text NOT NULL, - url text, - CONSTRAINT check_5b3011e234 CHECK ((char_length(url) <= 255)), - CONSTRAINT check_7ed527062f CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY namespace_aggregation_schedules ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_aggregation_schedules_namespace_id_seq'::regclass); -CREATE SEQUENCE issuable_metric_images_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY namespace_root_storage_statistics ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_root_storage_statistics_namespace_id_seq'::regclass); -ALTER SEQUENCE issuable_metric_images_id_seq OWNED BY issuable_metric_images.id; +ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass); -CREATE TABLE issuable_severities ( - id bigint NOT NULL, - issue_id bigint NOT NULL, - severity smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass); -CREATE SEQUENCE issuable_severities_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY namespaces_sync_events ALTER COLUMN id SET DEFAULT nextval('namespaces_sync_events_id_seq'::regclass); -ALTER SEQUENCE issuable_severities_id_seq OWNED BY issuable_severities.id; +ALTER TABLE ONLY note_diff_files ALTER COLUMN id SET DEFAULT nextval('note_diff_files_id_seq'::regclass); -CREATE TABLE issuable_slas ( - id bigint NOT NULL, - issue_id bigint NOT NULL, - due_at timestamp with time zone NOT NULL, - label_applied boolean DEFAULT false NOT NULL, - issuable_closed boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass); -CREATE SEQUENCE issuable_slas_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY notification_settings ALTER COLUMN id SET DEFAULT nextval('notification_settings_id_seq'::regclass); -ALTER SEQUENCE issuable_slas_id_seq OWNED BY issuable_slas.id; +ALTER TABLE ONLY oauth_access_grants ALTER COLUMN id SET DEFAULT nextval('oauth_access_grants_id_seq'::regclass); -CREATE TABLE issue_assignees ( - user_id integer NOT NULL, - issue_id integer NOT NULL -); +ALTER TABLE ONLY oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_access_tokens_id_seq'::regclass); -CREATE TABLE issue_email_participants ( - 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, - email text NOT NULL, - CONSTRAINT check_2c321d408d CHECK ((char_length(email) <= 255)) -); +ALTER TABLE ONLY oauth_applications ALTER COLUMN id SET DEFAULT nextval('oauth_applications_id_seq'::regclass); -CREATE SEQUENCE issue_email_participants_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY oauth_openid_requests ALTER COLUMN id SET DEFAULT nextval('oauth_openid_requests_id_seq'::regclass); -ALTER SEQUENCE issue_email_participants_id_seq OWNED BY issue_email_participants.id; +ALTER TABLE ONLY onboarding_progresses ALTER COLUMN id SET DEFAULT nextval('onboarding_progresses_id_seq'::regclass); -CREATE TABLE issue_links ( - id integer NOT NULL, - source_id integer NOT NULL, - target_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - link_type smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY operations_feature_flag_scopes ALTER COLUMN id SET DEFAULT nextval('operations_feature_flag_scopes_id_seq'::regclass); -CREATE SEQUENCE issue_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY operations_feature_flags ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_id_seq'::regclass); -ALTER SEQUENCE issue_links_id_seq OWNED BY issue_links.id; +ALTER TABLE ONLY operations_feature_flags_clients ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_clients_id_seq'::regclass); -CREATE TABLE issue_metrics ( - id integer NOT NULL, - issue_id integer NOT NULL, - first_mentioned_in_commit_at timestamp without time zone, - first_associated_with_milestone_at timestamp without time zone, - first_added_to_board_at timestamp without time zone, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY operations_feature_flags_issues ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_issues_id_seq'::regclass); -CREATE SEQUENCE issue_metrics_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY operations_scopes ALTER COLUMN id SET DEFAULT nextval('operations_scopes_id_seq'::regclass); -ALTER SEQUENCE issue_metrics_id_seq OWNED BY issue_metrics.id; +ALTER TABLE ONLY operations_strategies ALTER COLUMN id SET DEFAULT nextval('operations_strategies_id_seq'::regclass); -CREATE TABLE issue_tracker_data ( - id bigint NOT NULL, - service_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - encrypted_project_url character varying, - encrypted_project_url_iv character varying, - encrypted_issues_url character varying, - encrypted_issues_url_iv character varying, - encrypted_new_issue_url character varying, - encrypted_new_issue_url_iv character varying -); +ALTER TABLE ONLY operations_strategies_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_strategies_user_lists_id_seq'::regclass); -CREATE SEQUENCE issue_tracker_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY operations_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_user_lists_id_seq'::regclass); -ALTER SEQUENCE issue_tracker_data_id_seq OWNED BY issue_tracker_data.id; +ALTER TABLE ONLY packages_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_build_infos_id_seq'::regclass); -CREATE TABLE issue_user_mentions ( - id bigint NOT NULL, - issue_id integer NOT NULL, - note_id integer, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] -); +ALTER TABLE ONLY packages_composer_cache_files ALTER COLUMN id SET DEFAULT nextval('packages_composer_cache_files_id_seq'::regclass); -CREATE SEQUENCE issue_user_mentions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_conan_file_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_file_metadata_id_seq'::regclass); -ALTER SEQUENCE issue_user_mentions_id_seq OWNED BY issue_user_mentions.id; +ALTER TABLE ONLY packages_conan_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_metadata_id_seq'::regclass); -CREATE TABLE issues ( - id integer NOT NULL, - title character varying, - author_id integer, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - description text, - milestone_id integer, - iid integer, - updated_by_id integer, - confidential boolean DEFAULT false NOT NULL, - due_date date, - moved_to_id integer, - lock_version integer DEFAULT 0, - title_html text, - description_html text, - time_estimate integer, - relative_position integer, - cached_markdown_version integer, - last_edited_at timestamp without time zone, - last_edited_by_id integer, - discussion_locked boolean, - closed_at timestamp with time zone, - closed_by_id integer, - state_id smallint DEFAULT 1 NOT NULL, - service_desk_reply_to character varying, - weight integer, - duplicated_to_id integer, - promoted_to_epic_id integer, - health_status smallint, - sprint_id bigint, - external_key character varying(255), - blocking_issues_count integer DEFAULT 0 NOT NULL, - issue_type smallint DEFAULT 0 NOT NULL, - upvotes_count integer DEFAULT 0 NOT NULL, - work_item_type_id bigint -); +ALTER TABLE ONLY packages_debian_group_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_architectures_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_component_files_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_components_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_distribution_keys ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_distribution_keys_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_distributions_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_architectures_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_component_files_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_components_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_distribution_keys ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_distribution_keys_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_distributions_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_publications ALTER COLUMN id SET DEFAULT nextval('packages_debian_publications_id_seq'::regclass); + +ALTER TABLE ONLY packages_dependencies ALTER COLUMN id SET DEFAULT nextval('packages_dependencies_id_seq'::regclass); -CREATE SEQUENCE issues_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_dependency_links ALTER COLUMN id SET DEFAULT nextval('packages_dependency_links_id_seq'::regclass); -ALTER SEQUENCE issues_id_seq OWNED BY issues.id; +ALTER TABLE ONLY packages_events ALTER COLUMN id SET DEFAULT nextval('packages_events_id_seq'::regclass); -CREATE TABLE issues_prometheus_alert_events ( - issue_id bigint NOT NULL, - prometheus_alert_event_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY packages_maven_metadata ALTER COLUMN id SET DEFAULT nextval('packages_maven_metadata_id_seq'::regclass); -CREATE TABLE issues_self_managed_prometheus_alert_events ( - issue_id bigint NOT NULL, - self_managed_prometheus_alert_event_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY packages_package_file_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_package_file_build_infos_id_seq'::regclass); -CREATE TABLE iterations_cadences ( - id bigint NOT NULL, - 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, - last_run_date date, - duration_in_weeks integer, - iterations_in_advance integer, - active boolean DEFAULT true NOT NULL, - automatic boolean DEFAULT true NOT NULL, - title text NOT NULL, - roll_over boolean DEFAULT false NOT NULL, - description text, - CONSTRAINT check_5c5d2b44bd CHECK ((char_length(description) <= 5000)), - CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255)) -); +ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('packages_package_files_id_seq'::regclass); -CREATE SEQUENCE iterations_cadences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages_packages_id_seq'::regclass); -ALTER SEQUENCE iterations_cadences_id_seq OWNED BY iterations_cadences.id; +ALTER TABLE ONLY packages_tags ALTER COLUMN id SET DEFAULT nextval('packages_tags_id_seq'::regclass); -CREATE TABLE jira_connect_installations ( - id bigint NOT NULL, - client_key character varying, - encrypted_shared_secret character varying, - encrypted_shared_secret_iv character varying, - base_url character varying, - instance_url text, - CONSTRAINT check_4c6abed669 CHECK ((char_length(instance_url) <= 255)) -); +ALTER TABLE ONLY pages_deployment_states ALTER COLUMN pages_deployment_id SET DEFAULT nextval('pages_deployment_states_pages_deployment_id_seq'::regclass); -CREATE SEQUENCE jira_connect_installations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY pages_deployments ALTER COLUMN id SET DEFAULT nextval('pages_deployments_id_seq'::regclass); -ALTER SEQUENCE jira_connect_installations_id_seq OWNED BY jira_connect_installations.id; +ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('pages_domain_acme_orders_id_seq'::regclass); -CREATE TABLE jira_connect_subscriptions ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - jira_connect_installation_id bigint NOT NULL, - namespace_id integer NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass); -CREATE SEQUENCE jira_connect_subscriptions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass); -ALTER SEQUENCE jira_connect_subscriptions_id_seq OWNED BY jira_connect_subscriptions.id; +ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass); -CREATE TABLE jira_imports ( - id bigint NOT NULL, - project_id bigint NOT NULL, - user_id bigint, - label_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - finished_at timestamp with time zone, - jira_project_xid bigint NOT NULL, - total_issue_count integer DEFAULT 0 NOT NULL, - imported_issues_count integer DEFAULT 0 NOT NULL, - failed_to_import_count integer DEFAULT 0 NOT NULL, - status smallint DEFAULT 0 NOT NULL, - jid character varying(255), - jira_project_key character varying(255) NOT NULL, - jira_project_name character varying(255) NOT NULL, - scheduled_at timestamp with time zone, - error_message text, - CONSTRAINT check_9ed451c5b1 CHECK ((char_length(error_message) <= 1000)) -); +ALTER TABLE ONLY plan_limits ALTER COLUMN id SET DEFAULT nextval('plan_limits_id_seq'::regclass); -CREATE SEQUENCE jira_imports_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regclass); -ALTER SEQUENCE jira_imports_id_seq OWNED BY jira_imports.id; +ALTER TABLE ONLY pool_repositories ALTER COLUMN id SET DEFAULT nextval('pool_repositories_id_seq'::regclass); -CREATE TABLE jira_tracker_data ( - id bigint NOT NULL, - service_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - encrypted_url character varying, - encrypted_url_iv character varying, - encrypted_api_url character varying, - encrypted_api_url_iv character varying, - encrypted_username character varying, - encrypted_username_iv character varying, - encrypted_password character varying, - encrypted_password_iv character varying, - jira_issue_transition_id character varying, - project_key text, - issues_enabled boolean DEFAULT false NOT NULL, - deployment_type smallint DEFAULT 0 NOT NULL, - vulnerabilities_issuetype text, - vulnerabilities_enabled boolean DEFAULT false NOT NULL, - jira_issue_transition_automatic boolean DEFAULT false NOT NULL, - CONSTRAINT check_0bf84b76e9 CHECK ((char_length(vulnerabilities_issuetype) <= 255)), - CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255)) -); +ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('postgres_async_indexes_id_seq'::regclass); -CREATE SEQUENCE jira_tracker_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass); -ALTER SEQUENCE jira_tracker_data_id_seq OWNED BY jira_tracker_data.id; +ALTER TABLE ONLY postgres_reindex_queued_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_queued_actions_id_seq'::regclass); -CREATE TABLE keys ( - id integer NOT NULL, - user_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - key text, - title character varying, - type character varying, - fingerprint character varying, - public boolean DEFAULT false NOT NULL, - last_used_at timestamp without time zone, - fingerprint_sha256 bytea, - expires_at timestamp with time zone, - expiry_notification_delivered_at timestamp with time zone, - before_expiry_notification_delivered_at timestamp with time zone -); +ALTER TABLE ONLY product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass); -CREATE SEQUENCE keys_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY programming_languages ALTER COLUMN id SET DEFAULT nextval('programming_languages_id_seq'::regclass); -ALTER SEQUENCE keys_id_seq OWNED BY keys.id; +ALTER TABLE ONLY project_aliases ALTER COLUMN id SET DEFAULT nextval('project_aliases_id_seq'::regclass); -CREATE TABLE label_links ( - id integer NOT NULL, - label_id integer, - target_id integer, - target_type character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone -); +ALTER TABLE ONLY project_auto_devops ALTER COLUMN id SET DEFAULT nextval('project_auto_devops_id_seq'::regclass); -CREATE SEQUENCE label_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY project_build_artifacts_size_refreshes ALTER COLUMN id SET DEFAULT nextval('project_build_artifacts_size_refreshes_id_seq'::regclass); -ALTER SEQUENCE label_links_id_seq OWNED BY label_links.id; +ALTER TABLE ONLY project_ci_cd_settings ALTER COLUMN id SET DEFAULT nextval('project_ci_cd_settings_id_seq'::regclass); -CREATE TABLE label_priorities ( - id integer NOT NULL, - project_id integer NOT NULL, - label_id integer NOT NULL, - priority integer NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY project_ci_feature_usages ALTER COLUMN id SET DEFAULT nextval('project_ci_feature_usages_id_seq'::regclass); -CREATE SEQUENCE label_priorities_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY project_compliance_framework_settings ALTER COLUMN project_id SET DEFAULT nextval('project_compliance_framework_settings_project_id_seq'::regclass); -ALTER SEQUENCE label_priorities_id_seq OWNED BY label_priorities.id; +ALTER TABLE ONLY project_custom_attributes ALTER COLUMN id SET DEFAULT nextval('project_custom_attributes_id_seq'::regclass); -CREATE TABLE labels ( - id integer NOT NULL, - title character varying, - color character varying, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - template boolean DEFAULT false, - description character varying, - description_html text, - type character varying, - group_id integer, - cached_markdown_version integer -); +ALTER TABLE ONLY project_daily_statistics ALTER COLUMN id SET DEFAULT nextval('project_daily_statistics_id_seq'::regclass); -CREATE SEQUENCE labels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY project_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('project_deploy_tokens_id_seq'::regclass); + +ALTER TABLE ONLY project_export_jobs ALTER COLUMN id SET DEFAULT nextval('project_export_jobs_id_seq'::regclass); + +ALTER TABLE ONLY project_features ALTER COLUMN id SET DEFAULT nextval('project_features_id_seq'::regclass); + +ALTER TABLE ONLY project_group_links ALTER COLUMN id SET DEFAULT nextval('project_group_links_id_seq'::regclass); + +ALTER TABLE ONLY project_import_data ALTER COLUMN id SET DEFAULT nextval('project_import_data_id_seq'::regclass); + +ALTER TABLE ONLY project_mirror_data ALTER COLUMN id SET DEFAULT nextval('project_mirror_data_id_seq'::regclass); + +ALTER TABLE ONLY project_repositories ALTER COLUMN id SET DEFAULT nextval('project_repositories_id_seq'::regclass); + +ALTER TABLE ONLY project_repository_states ALTER COLUMN id SET DEFAULT nextval('project_repository_states_id_seq'::regclass); + +ALTER TABLE ONLY project_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('project_repository_storage_moves_id_seq'::regclass); + +ALTER TABLE ONLY project_security_settings ALTER COLUMN project_id SET DEFAULT nextval('project_security_settings_project_id_seq'::regclass); + +ALTER TABLE ONLY project_statistics ALTER COLUMN id SET DEFAULT nextval('project_statistics_id_seq'::regclass); + +ALTER TABLE ONLY project_topics ALTER COLUMN id SET DEFAULT nextval('project_topics_id_seq'::regclass); -ALTER SEQUENCE labels_id_seq OWNED BY labels.id; +ALTER TABLE ONLY project_tracing_settings ALTER COLUMN id SET DEFAULT nextval('project_tracing_settings_id_seq'::regclass); -CREATE TABLE ldap_group_links ( - id integer NOT NULL, - cn character varying, - group_access integer NOT NULL, - group_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - provider character varying, - filter character varying -); +ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass); -CREATE SEQUENCE ldap_group_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY projects_sync_events ALTER COLUMN id SET DEFAULT nextval('projects_sync_events_id_seq'::regclass); -ALTER SEQUENCE ldap_group_links_id_seq OWNED BY ldap_group_links.id; +ALTER TABLE ONLY prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('prometheus_alert_events_id_seq'::regclass); -CREATE TABLE lfs_file_locks ( - id integer NOT NULL, - project_id integer NOT NULL, - user_id integer NOT NULL, - created_at timestamp without time zone NOT NULL, - path character varying(511) -); +ALTER TABLE ONLY prometheus_alerts ALTER COLUMN id SET DEFAULT nextval('prometheus_alerts_id_seq'::regclass); -CREATE SEQUENCE lfs_file_locks_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY prometheus_metrics ALTER COLUMN id SET DEFAULT nextval('prometheus_metrics_id_seq'::regclass); -ALTER SEQUENCE lfs_file_locks_id_seq OWNED BY lfs_file_locks.id; +ALTER TABLE ONLY protected_branch_merge_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_merge_access_levels_id_seq'::regclass); -CREATE TABLE lfs_objects ( - id integer NOT NULL, - oid character varying NOT NULL, - size bigint NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - file character varying, - file_store integer DEFAULT 1, - CONSTRAINT check_eecfc5717d CHECK ((file_store IS NOT NULL)) -); +ALTER TABLE ONLY protected_branch_push_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_push_access_levels_id_seq'::regclass); -CREATE SEQUENCE lfs_objects_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY protected_branch_unprotect_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_unprotect_access_levels_id_seq'::regclass); -ALTER SEQUENCE lfs_objects_id_seq OWNED BY lfs_objects.id; +ALTER TABLE ONLY protected_branches ALTER COLUMN id SET DEFAULT nextval('protected_branches_id_seq'::regclass); -CREATE TABLE lfs_objects_projects ( - id integer NOT NULL, - lfs_object_id integer NOT NULL, - project_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - repository_type smallint -); +ALTER TABLE ONLY protected_environment_approval_rules ALTER COLUMN id SET DEFAULT nextval('protected_environment_approval_rules_id_seq'::regclass); -CREATE SEQUENCE lfs_objects_projects_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY protected_environment_deploy_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_environment_deploy_access_levels_id_seq'::regclass); -ALTER SEQUENCE lfs_objects_projects_id_seq OWNED BY lfs_objects_projects.id; +ALTER TABLE ONLY protected_environments ALTER COLUMN id SET DEFAULT nextval('protected_environments_id_seq'::regclass); -CREATE TABLE licenses ( - id integer NOT NULL, - data text NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - cloud boolean DEFAULT false, - last_synced_at timestamp with time zone -); +ALTER TABLE ONLY protected_tag_create_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_tag_create_access_levels_id_seq'::regclass); -CREATE SEQUENCE licenses_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY protected_tags ALTER COLUMN id SET DEFAULT nextval('protected_tags_id_seq'::regclass); -ALTER SEQUENCE licenses_id_seq OWNED BY licenses.id; +ALTER TABLE ONLY push_rules ALTER COLUMN id SET DEFAULT nextval('push_rules_id_seq'::regclass); -CREATE TABLE list_user_preferences ( - id bigint NOT NULL, - user_id bigint NOT NULL, - list_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - collapsed boolean -); +ALTER TABLE ONLY raw_usage_data ALTER COLUMN id SET DEFAULT nextval('raw_usage_data_id_seq'::regclass); -CREATE SEQUENCE list_user_preferences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY redirect_routes ALTER COLUMN id SET DEFAULT nextval('redirect_routes_id_seq'::regclass); -ALTER SEQUENCE list_user_preferences_id_seq OWNED BY list_user_preferences.id; +ALTER TABLE ONLY related_epic_links ALTER COLUMN id SET DEFAULT nextval('related_epic_links_id_seq'::regclass); -CREATE TABLE lists ( - id integer NOT NULL, - board_id integer NOT NULL, - label_id integer, - list_type integer DEFAULT 1 NOT NULL, - "position" integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - milestone_id integer, - user_id integer, - max_issue_count integer DEFAULT 0 NOT NULL, - max_issue_weight integer DEFAULT 0 NOT NULL, - limit_metric character varying(20), - iteration_id bigint -); +ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_links_id_seq'::regclass); -CREATE SEQUENCE lists_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq'::regclass); -ALTER SEQUENCE lists_id_seq OWNED BY lists.id; +ALTER TABLE ONLY remote_mirrors ALTER COLUMN id SET DEFAULT nextval('remote_mirrors_id_seq'::regclass); -CREATE TABLE members ( - id integer NOT NULL, - access_level integer NOT NULL, - source_id integer NOT NULL, - source_type character varying NOT NULL, - user_id integer, - notification_level integer NOT NULL, - type character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - created_by_id integer, - invite_email character varying, - invite_token character varying, - invite_accepted_at timestamp without time zone, - requested_at timestamp without time zone, - expires_at date, - ldap boolean DEFAULT false NOT NULL, - override boolean DEFAULT false NOT NULL, - invite_email_success boolean DEFAULT true NOT NULL -); +ALTER TABLE ONLY required_code_owners_sections ALTER COLUMN id SET DEFAULT nextval('required_code_owners_sections_id_seq'::regclass); -CREATE SEQUENCE members_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY requirements ALTER COLUMN id SET DEFAULT nextval('requirements_id_seq'::regclass); -ALTER SEQUENCE members_id_seq OWNED BY members.id; +ALTER TABLE ONLY requirements_management_test_reports ALTER COLUMN id SET DEFAULT nextval('requirements_management_test_reports_id_seq'::regclass); -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 -); +ALTER TABLE ONLY resource_iteration_events ALTER COLUMN id SET DEFAULT nextval('resource_iteration_events_id_seq'::regclass); -CREATE SEQUENCE merge_request_assignees_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY resource_label_events ALTER COLUMN id SET DEFAULT nextval('resource_label_events_id_seq'::regclass); -ALTER SEQUENCE merge_request_assignees_id_seq OWNED BY merge_request_assignees.id; +ALTER TABLE ONLY resource_milestone_events ALTER COLUMN id SET DEFAULT nextval('resource_milestone_events_id_seq'::regclass); -CREATE TABLE merge_request_blocks ( - id bigint NOT NULL, - blocking_merge_request_id integer NOT NULL, - blocked_merge_request_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY resource_state_events ALTER COLUMN id SET DEFAULT nextval('resource_state_events_id_seq'::regclass); -CREATE SEQUENCE merge_request_blocks_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY resource_weight_events ALTER COLUMN id SET DEFAULT nextval('resource_weight_events_id_seq'::regclass); -ALTER SEQUENCE merge_request_blocks_id_seq OWNED BY merge_request_blocks.id; +ALTER TABLE ONLY reviews ALTER COLUMN id SET DEFAULT nextval('reviews_id_seq'::regclass); -CREATE TABLE merge_request_cleanup_schedules ( - merge_request_id bigint NOT NULL, - scheduled_at timestamp with time zone NOT NULL, - completed_at timestamp with time zone, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - status smallint DEFAULT 0 NOT NULL, - failed_count integer DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY routes ALTER COLUMN id SET DEFAULT nextval('routes_id_seq'::regclass); -CREATE SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY saml_group_links ALTER COLUMN id SET DEFAULT nextval('saml_group_links_id_seq'::regclass); -ALTER SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq OWNED BY merge_request_cleanup_schedules.merge_request_id; +ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_providers_id_seq'::regclass); -CREATE TABLE merge_request_context_commit_diff_files ( - merge_request_context_commit_id bigint NOT NULL, - sha bytea NOT NULL, - relative_order integer NOT NULL, - a_mode character varying(255) NOT NULL, - b_mode character varying(255) NOT NULL, - new_file boolean NOT NULL, - renamed_file boolean NOT NULL, - deleted_file boolean NOT NULL, - too_large boolean NOT NULL, - "binary" boolean, - new_path text NOT NULL, - old_path text NOT NULL, - diff text -); +ALTER TABLE ONLY saved_replies ALTER COLUMN id SET DEFAULT nextval('saved_replies_id_seq'::regclass); -CREATE TABLE merge_request_context_commits ( - id bigint NOT NULL, - merge_request_id bigint, - authored_date timestamp with time zone, - committed_date timestamp with time zone, - sha bytea NOT NULL, - relative_order integer NOT NULL, - author_name text, - author_email text, - committer_name text, - committer_email text, - message text, - trailers jsonb DEFAULT '{}'::jsonb NOT NULL -); +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); -CREATE SEQUENCE merge_request_context_commits_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY security_findings ALTER COLUMN id SET DEFAULT nextval('security_findings_id_seq'::regclass); -ALTER SEQUENCE merge_request_context_commits_id_seq OWNED BY merge_request_context_commits.id; +ALTER TABLE ONLY security_orchestration_policy_configurations ALTER COLUMN id SET DEFAULT nextval('security_orchestration_policy_configurations_id_seq'::regclass); -CREATE TABLE merge_request_diff_commit_users ( - id bigint NOT NULL, - name text, - email text, - CONSTRAINT check_147358fc42 CHECK ((char_length(name) <= 512)), - CONSTRAINT check_f5fa206cf7 CHECK ((char_length(email) <= 512)), - CONSTRAINT merge_request_diff_commit_users_name_or_email_existence CHECK (((COALESCE(name, ''::text) <> ''::text) OR (COALESCE(email, ''::text) <> ''::text))) -); +ALTER TABLE ONLY security_orchestration_policy_rule_schedules ALTER COLUMN id SET DEFAULT nextval('security_orchestration_policy_rule_schedules_id_seq'::regclass); -CREATE SEQUENCE merge_request_diff_commit_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY security_scans ALTER COLUMN id SET DEFAULT nextval('security_scans_id_seq'::regclass); -ALTER SEQUENCE merge_request_diff_commit_users_id_seq OWNED BY merge_request_diff_commit_users.id; +ALTER TABLE ONLY security_training_providers ALTER COLUMN id SET DEFAULT nextval('security_training_providers_id_seq'::regclass); -CREATE TABLE merge_request_diff_commits ( - authored_date timestamp with time zone, - committed_date timestamp with time zone, - 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, - committer_id bigint -); +ALTER TABLE ONLY security_trainings ALTER COLUMN id SET DEFAULT nextval('security_trainings_id_seq'::regclass); -CREATE TABLE merge_request_diff_details ( - merge_request_diff_id bigint NOT NULL, - verification_retry_at timestamp with time zone, - verified_at timestamp with time zone, - verification_retry_count smallint, - verification_checksum bytea, - verification_failure text, - verification_state smallint DEFAULT 0 NOT NULL, - verification_started_at timestamp with time zone, - CONSTRAINT check_81429e3622 CHECK ((char_length(verification_failure) <= 255)) -); +ALTER TABLE ONLY self_managed_prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('self_managed_prometheus_alert_events_id_seq'::regclass); -CREATE SEQUENCE merge_request_diff_details_merge_request_diff_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY sent_notifications ALTER COLUMN id SET DEFAULT nextval('sent_notifications_id_seq'::regclass); -ALTER SEQUENCE merge_request_diff_details_merge_request_diff_id_seq OWNED BY merge_request_diff_details.merge_request_diff_id; +ALTER TABLE ONLY sentry_issues ALTER COLUMN id SET DEFAULT nextval('sentry_issues_id_seq'::regclass); -CREATE TABLE merge_request_diff_files ( - merge_request_diff_id integer NOT NULL, - relative_order integer NOT NULL, - new_file boolean NOT NULL, - renamed_file boolean NOT NULL, - deleted_file boolean NOT NULL, - too_large boolean NOT NULL, - a_mode character varying NOT NULL, - b_mode character varying NOT NULL, - new_path text NOT NULL, - old_path text NOT NULL, - diff text, - "binary" boolean, - external_diff_offset integer, - external_diff_size integer -); +ALTER TABLE ONLY shards ALTER COLUMN id SET DEFAULT nextval('shards_id_seq'::regclass); -CREATE TABLE merge_request_diffs ( - id integer NOT NULL, - state character varying, - merge_request_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - base_commit_sha character varying, - real_size character varying, - head_commit_sha character varying, - start_commit_sha character varying, - commits_count integer, - external_diff character varying, - external_diff_store integer DEFAULT 1, - stored_externally boolean, - files_count smallint, - sorted boolean DEFAULT false NOT NULL, - diff_type smallint DEFAULT 1 NOT NULL, - CONSTRAINT check_93ee616ac9 CHECK ((external_diff_store IS NOT NULL)) -); +ALTER TABLE ONLY slack_integrations ALTER COLUMN id SET DEFAULT nextval('slack_integrations_id_seq'::regclass); -CREATE SEQUENCE merge_request_diffs_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY smartcard_identities ALTER COLUMN id SET DEFAULT nextval('smartcard_identities_id_seq'::regclass); -ALTER SEQUENCE merge_request_diffs_id_seq OWNED BY merge_request_diffs.id; +ALTER TABLE ONLY snippet_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('snippet_repository_storage_moves_id_seq'::regclass); -CREATE TABLE merge_request_metrics ( - id integer NOT NULL, - merge_request_id integer NOT NULL, - latest_build_started_at timestamp without time zone, - latest_build_finished_at timestamp without time zone, - first_deployed_to_production_at timestamp without time zone, - merged_at timestamp without time zone, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - pipeline_id integer, - merged_by_id integer, - latest_closed_by_id integer, - latest_closed_at timestamp with time zone, - first_comment_at timestamp with time zone, - first_commit_at timestamp with time zone, - last_commit_at timestamp with time zone, - diff_size integer, - modified_paths_size integer, - commits_count integer, - first_approved_at timestamp with time zone, - first_reassigned_at timestamp with time zone, - added_lines integer, - removed_lines integer, - target_project_id integer, - CONSTRAINT check_e03d0900bf CHECK ((target_project_id IS NOT NULL)) -); +ALTER TABLE ONLY snippet_user_mentions ALTER COLUMN id SET DEFAULT nextval('snippet_user_mentions_id_seq'::regclass); -CREATE SEQUENCE merge_request_metrics_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY snippets ALTER COLUMN id SET DEFAULT nextval('snippets_id_seq'::regclass); -ALTER SEQUENCE merge_request_metrics_id_seq OWNED BY merge_request_metrics.id; +ALTER TABLE ONLY software_license_policies ALTER COLUMN id SET DEFAULT nextval('software_license_policies_id_seq'::regclass); -CREATE TABLE merge_request_reviewers ( - id bigint NOT NULL, - user_id bigint NOT NULL, - merge_request_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - state smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY software_licenses ALTER COLUMN id SET DEFAULT nextval('software_licenses_id_seq'::regclass); -CREATE SEQUENCE merge_request_reviewers_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY spam_logs ALTER COLUMN id SET DEFAULT nextval('spam_logs_id_seq'::regclass); -ALTER SEQUENCE merge_request_reviewers_id_seq OWNED BY merge_request_reviewers.id; +ALTER TABLE ONLY sprints ALTER COLUMN id SET DEFAULT nextval('sprints_id_seq'::regclass); -CREATE TABLE merge_request_user_mentions ( - id bigint NOT NULL, - merge_request_id integer NOT NULL, - note_id integer, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] -); +ALTER TABLE ONLY status_check_responses ALTER COLUMN id SET DEFAULT nextval('status_check_responses_id_seq'::regclass); -CREATE SEQUENCE merge_request_user_mentions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY status_page_published_incidents ALTER COLUMN id SET DEFAULT nextval('status_page_published_incidents_id_seq'::regclass); -ALTER SEQUENCE merge_request_user_mentions_id_seq OWNED BY merge_request_user_mentions.id; +ALTER TABLE ONLY status_page_settings ALTER COLUMN project_id SET DEFAULT nextval('status_page_settings_project_id_seq'::regclass); -CREATE TABLE merge_requests ( - id integer NOT NULL, - target_branch character varying NOT NULL, - source_branch character varying NOT NULL, - source_project_id integer, - author_id integer, - assignee_id integer, - title character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - milestone_id integer, - merge_status character varying DEFAULT 'unchecked'::character varying NOT NULL, - target_project_id integer NOT NULL, - iid integer, - description text, - updated_by_id integer, - merge_error text, - merge_params text, - merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL, - merge_user_id integer, - merge_commit_sha character varying, - rebase_commit_sha character varying, - in_progress_merge_commit_sha character varying, - lock_version integer DEFAULT 0, - title_html text, - description_html text, - time_estimate integer, - cached_markdown_version integer, - last_edited_at timestamp without time zone, - last_edited_by_id integer, - head_pipeline_id integer, - merge_jid character varying, - discussion_locked boolean, - latest_merge_request_diff_id integer, - allow_maintainer_to_push boolean DEFAULT true, - squash boolean DEFAULT false NOT NULL, - state_id smallint DEFAULT 1 NOT NULL, - approvals_before_merge integer, - rebase_jid character varying, - squash_commit_sha bytea, - sprint_id bigint, - merge_ref_sha bytea, - draft boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY subscriptions ALTER COLUMN id SET DEFAULT nextval('subscriptions_id_seq'::regclass); -CREATE TABLE merge_requests_closing_issues ( - id integer NOT NULL, - merge_request_id integer NOT NULL, - issue_id integer NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY suggestions ALTER COLUMN id SET DEFAULT nextval('suggestions_id_seq'::regclass); -CREATE SEQUENCE merge_requests_closing_issues_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY system_note_metadata ALTER COLUMN id SET DEFAULT nextval('system_note_metadata_id_seq'::regclass); -ALTER SEQUENCE merge_requests_closing_issues_id_seq OWNED BY merge_requests_closing_issues.id; +ALTER TABLE ONLY taggings ALTER COLUMN id SET DEFAULT nextval('taggings_id_seq'::regclass); -CREATE SEQUENCE merge_requests_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); + +ALTER TABLE ONLY term_agreements ALTER COLUMN id SET DEFAULT nextval('term_agreements_id_seq'::regclass); + +ALTER TABLE ONLY terraform_state_versions ALTER COLUMN id SET DEFAULT nextval('terraform_state_versions_id_seq'::regclass); + +ALTER TABLE ONLY terraform_states ALTER COLUMN id SET DEFAULT nextval('terraform_states_id_seq'::regclass); -ALTER SEQUENCE merge_requests_id_seq OWNED BY merge_requests.id; +ALTER TABLE ONLY timelogs ALTER COLUMN id SET DEFAULT nextval('timelogs_id_seq'::regclass); -CREATE TABLE merge_trains ( - id bigint NOT NULL, - merge_request_id integer NOT NULL, - user_id integer NOT NULL, - pipeline_id integer, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - target_project_id integer NOT NULL, - target_branch text NOT NULL, - status smallint DEFAULT 0 NOT NULL, - merged_at timestamp with time zone, - duration integer -); +ALTER TABLE ONLY todos ALTER COLUMN id SET DEFAULT nextval('todos_id_seq'::regclass); -CREATE SEQUENCE merge_trains_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY token_with_ivs ALTER COLUMN id SET DEFAULT nextval('token_with_ivs_id_seq'::regclass); -ALTER SEQUENCE merge_trains_id_seq OWNED BY merge_trains.id; +ALTER TABLE ONLY topics ALTER COLUMN id SET DEFAULT nextval('topics_id_seq'::regclass); -CREATE TABLE metrics_dashboard_annotations ( - id bigint NOT NULL, - starting_at timestamp with time zone NOT NULL, - ending_at timestamp with time zone, - environment_id bigint, - cluster_id bigint, - dashboard_path character varying(255) NOT NULL, - panel_xid character varying(255), - description text NOT NULL -); +ALTER TABLE ONLY trending_projects ALTER COLUMN id SET DEFAULT nextval('trending_projects_id_seq'::regclass); -CREATE SEQUENCE metrics_dashboard_annotations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY u2f_registrations ALTER COLUMN id SET DEFAULT nextval('u2f_registrations_id_seq'::regclass); -ALTER SEQUENCE metrics_dashboard_annotations_id_seq OWNED BY metrics_dashboard_annotations.id; +ALTER TABLE ONLY upcoming_reconciliations ALTER COLUMN id SET DEFAULT nextval('upcoming_reconciliations_id_seq'::regclass); -CREATE TABLE metrics_users_starred_dashboards ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - user_id bigint NOT NULL, - dashboard_path text NOT NULL, - CONSTRAINT check_79a84a0f57 CHECK ((char_length(dashboard_path) <= 255)) -); +ALTER TABLE ONLY upload_states ALTER COLUMN upload_id SET DEFAULT nextval('upload_states_upload_id_seq'::regclass); -CREATE SEQUENCE metrics_users_starred_dashboards_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); -ALTER SEQUENCE metrics_users_starred_dashboards_id_seq OWNED BY metrics_users_starred_dashboards.id; +ALTER TABLE ONLY user_agent_details ALTER COLUMN id SET DEFAULT nextval('user_agent_details_id_seq'::regclass); -CREATE TABLE milestone_releases ( - milestone_id bigint NOT NULL, - release_id bigint NOT NULL -); +ALTER TABLE ONLY user_callouts ALTER COLUMN id SET DEFAULT nextval('user_callouts_id_seq'::regclass); -CREATE TABLE milestones ( - id integer NOT NULL, - title character varying NOT NULL, - project_id integer, - description text, - due_date date, - created_at timestamp without time zone, - updated_at timestamp without time zone, - state character varying, - iid integer, - title_html text, - description_html text, - start_date date, - cached_markdown_version integer, - group_id integer -); +ALTER TABLE ONLY user_canonical_emails ALTER COLUMN id SET DEFAULT nextval('user_canonical_emails_id_seq'::regclass); -CREATE SEQUENCE milestones_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY user_custom_attributes ALTER COLUMN id SET DEFAULT nextval('user_custom_attributes_id_seq'::regclass); -ALTER SEQUENCE milestones_id_seq OWNED BY milestones.id; +ALTER TABLE ONLY user_details ALTER COLUMN user_id SET DEFAULT nextval('user_details_user_id_seq'::regclass); -CREATE TABLE namespace_admin_notes ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - namespace_id bigint NOT NULL, - note text, - CONSTRAINT check_e9d2e71b5d CHECK ((char_length(note) <= 1000)) -); +ALTER TABLE ONLY user_group_callouts ALTER COLUMN id SET DEFAULT nextval('user_group_callouts_id_seq'::regclass); -CREATE SEQUENCE namespace_admin_notes_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY user_permission_export_uploads ALTER COLUMN id SET DEFAULT nextval('user_permission_export_uploads_id_seq'::regclass); -ALTER SEQUENCE namespace_admin_notes_id_seq OWNED BY namespace_admin_notes.id; +ALTER TABLE ONLY user_preferences ALTER COLUMN id SET DEFAULT nextval('user_preferences_id_seq'::regclass); -CREATE TABLE namespace_aggregation_schedules ( - namespace_id integer NOT NULL -); +ALTER TABLE ONLY user_statuses ALTER COLUMN user_id SET DEFAULT nextval('user_statuses_user_id_seq'::regclass); -CREATE SEQUENCE namespace_aggregation_schedules_namespace_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY user_synced_attributes_metadata ALTER COLUMN id SET DEFAULT nextval('user_synced_attributes_metadata_id_seq'::regclass); -ALTER SEQUENCE namespace_aggregation_schedules_namespace_id_seq OWNED BY namespace_aggregation_schedules.namespace_id; +ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); -CREATE TABLE namespace_limits ( - additional_purchased_storage_size bigint DEFAULT 0 NOT NULL, - additional_purchased_storage_ends_on date, - namespace_id integer NOT NULL, - temporary_storage_increase_ends_on date -); +ALTER TABLE ONLY users_ops_dashboard_projects ALTER COLUMN id SET DEFAULT nextval('users_ops_dashboard_projects_id_seq'::regclass); -CREATE TABLE namespace_package_settings ( - namespace_id bigint NOT NULL, - maven_duplicates_allowed boolean DEFAULT true NOT NULL, - maven_duplicate_exception_regex text DEFAULT ''::text NOT NULL, - generic_duplicates_allowed boolean DEFAULT true NOT NULL, - generic_duplicate_exception_regex text DEFAULT ''::text NOT NULL, - CONSTRAINT check_31340211b1 CHECK ((char_length(generic_duplicate_exception_regex) <= 255)), - CONSTRAINT check_d63274b2b6 CHECK ((char_length(maven_duplicate_exception_regex) <= 255)) -); +ALTER TABLE ONLY users_star_projects ALTER COLUMN id SET DEFAULT nextval('users_star_projects_id_seq'::regclass); -CREATE TABLE namespace_root_storage_statistics ( - namespace_id integer NOT NULL, - updated_at timestamp with time zone NOT NULL, - repository_size bigint DEFAULT 0 NOT NULL, - lfs_objects_size bigint DEFAULT 0 NOT NULL, - wiki_size bigint DEFAULT 0 NOT NULL, - build_artifacts_size bigint DEFAULT 0 NOT NULL, - storage_size bigint DEFAULT 0 NOT NULL, - 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 -); +ALTER TABLE ONLY users_statistics ALTER COLUMN id SET DEFAULT nextval('users_statistics_id_seq'::regclass); -CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerabilities ALTER COLUMN id SET DEFAULT nextval('vulnerabilities_id_seq'::regclass); -ALTER SEQUENCE namespace_root_storage_statistics_namespace_id_seq OWNED BY namespace_root_storage_statistics.namespace_id; +ALTER TABLE ONLY vulnerability_exports ALTER COLUMN id SET DEFAULT nextval('vulnerability_exports_id_seq'::regclass); -CREATE TABLE namespace_settings ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - namespace_id integer NOT NULL, - prevent_forking_outside_group boolean DEFAULT false NOT NULL, - allow_mfa_for_subgroups boolean DEFAULT true NOT NULL, - default_branch_name text, - repository_read_only boolean DEFAULT false NOT NULL, - delayed_project_removal boolean, - lock_delayed_project_removal boolean DEFAULT false NOT NULL, - resource_access_token_creation_allowed boolean DEFAULT true NOT NULL, - prevent_sharing_groups_outside_hierarchy boolean DEFAULT false NOT NULL, - new_user_signups_cap integer, - setup_for_company boolean, - jobs_to_be_done smallint, - CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)) -); +ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_external_issue_links_id_seq'::regclass); -CREATE TABLE namespace_statistics ( - id integer NOT NULL, - namespace_id integer NOT NULL, - 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 -); +ALTER TABLE ONLY vulnerability_feedback ALTER COLUMN id SET DEFAULT nextval('vulnerability_feedback_id_seq'::regclass); -CREATE SEQUENCE namespace_statistics_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_finding_evidences ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidences_id_seq'::regclass); -ALTER SEQUENCE namespace_statistics_id_seq OWNED BY namespace_statistics.id; +ALTER TABLE ONLY vulnerability_finding_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_links_id_seq'::regclass); -CREATE TABLE namespaces ( - id integer NOT NULL, - name character varying NOT NULL, - path character varying NOT NULL, - owner_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - type character varying, - description character varying DEFAULT ''::character varying NOT NULL, - avatar character varying, - share_with_group_lock boolean DEFAULT false, - visibility_level integer DEFAULT 20 NOT NULL, - request_access_enabled boolean DEFAULT true NOT NULL, - description_html text, - lfs_enabled boolean, - parent_id integer, - require_two_factor_authentication boolean DEFAULT false NOT NULL, - two_factor_grace_period integer DEFAULT 48 NOT NULL, - cached_markdown_version integer, - runners_token character varying, - project_creation_level integer, - runners_token_encrypted character varying, - auto_devops_enabled boolean, - custom_project_templates_group_id integer, - file_template_project_id integer, - ldap_sync_error character varying, - ldap_sync_last_successful_update_at timestamp without time zone, - ldap_sync_last_sync_at timestamp without time zone, - ldap_sync_last_update_at timestamp without time zone, - repository_size_limit bigint, - saml_discovery_token character varying, - shared_runners_minutes_limit integer, - extra_shared_runners_minutes_limit integer, - ldap_sync_status character varying DEFAULT 'ready'::character varying NOT NULL, - membership_lock boolean DEFAULT false, - last_ci_minutes_notification_at timestamp with time zone, - last_ci_minutes_usage_notification_level integer, - subgroup_creation_level integer DEFAULT 1, - emails_disabled boolean, - max_pages_size integer, - max_artifacts_size integer, - mentions_disabled boolean, - default_branch_protection smallint, - unlock_membership_to_ldap boolean, - max_personal_access_token_lifetime integer, - push_rule_id bigint, - shared_runners_enabled boolean DEFAULT true NOT NULL, - allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, - traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, - delayed_project_removal boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY vulnerability_finding_signatures ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_signatures_id_seq'::regclass); -CREATE SEQUENCE namespaces_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_findings_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_findings_remediations_id_seq'::regclass); -ALTER SEQUENCE namespaces_id_seq OWNED BY namespaces.id; +ALTER TABLE ONLY vulnerability_flags ALTER COLUMN id SET DEFAULT nextval('vulnerability_flags_id_seq'::regclass); -CREATE TABLE note_diff_files ( - id integer NOT NULL, - diff_note_id integer NOT NULL, - diff text NOT NULL, - new_file boolean NOT NULL, - renamed_file boolean NOT NULL, - deleted_file boolean NOT NULL, - a_mode character varying NOT NULL, - b_mode character varying NOT NULL, - new_path text NOT NULL, - old_path text NOT NULL -); +ALTER TABLE ONLY vulnerability_historical_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_historical_statistics_id_seq'::regclass); -CREATE SEQUENCE note_diff_files_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_identifiers_id_seq'::regclass); -ALTER SEQUENCE note_diff_files_id_seq OWNED BY note_diff_files.id; +ALTER TABLE ONLY vulnerability_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_issue_links_id_seq'::regclass); -CREATE TABLE notes ( - id integer NOT NULL, - note text, - noteable_type character varying, - author_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - project_id integer, - attachment character varying, - line_code character varying, - commit_id character varying, - noteable_id integer, - system boolean DEFAULT false NOT NULL, - st_diff text, - updated_by_id integer, - type character varying, - "position" text, - original_position text, - resolved_at timestamp without time zone, - resolved_by_id integer, - discussion_id character varying, - note_html text, - cached_markdown_version integer, - change_position text, - resolved_by_push boolean, - review_id bigint, - confidential boolean, - last_edited_at timestamp with time zone -); +ALTER TABLE ONLY vulnerability_occurrence_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_identifiers_id_seq'::regclass); -CREATE SEQUENCE notes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_pipelines_id_seq'::regclass); -ALTER SEQUENCE notes_id_seq OWNED BY notes.id; +ALTER TABLE ONLY vulnerability_occurrences ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrences_id_seq'::regclass); -CREATE TABLE notification_settings ( - id integer NOT NULL, - user_id integer NOT NULL, - source_type character varying, - source_id integer, - level integer DEFAULT 0 NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - new_note boolean, - new_issue boolean, - reopen_issue boolean, - close_issue boolean, - reassign_issue boolean, - new_merge_request boolean, - reopen_merge_request boolean, - close_merge_request boolean, - reassign_merge_request boolean, - merge_merge_request boolean, - failed_pipeline boolean, - success_pipeline boolean, - push_to_merge_request boolean, - issue_due boolean, - notification_email character varying, - new_epic boolean, - new_release boolean, - fixed_pipeline boolean, - moved_project boolean DEFAULT true NOT NULL, - change_reviewer_merge_request boolean, - merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY vulnerability_reads ALTER COLUMN id SET DEFAULT nextval('vulnerability_reads_id_seq'::regclass); -CREATE SEQUENCE notification_settings_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_remediations_id_seq'::regclass); -ALTER SEQUENCE notification_settings_id_seq OWNED BY notification_settings.id; +ALTER TABLE ONLY vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('vulnerability_scanners_id_seq'::regclass); -CREATE TABLE oauth_access_grants ( - id integer NOT NULL, - resource_owner_id integer NOT NULL, - application_id integer NOT NULL, - token character varying NOT NULL, - expires_in integer NOT NULL, - redirect_uri text NOT NULL, - created_at timestamp without time zone NOT NULL, - revoked_at timestamp without time zone, - scopes character varying, - code_challenge text, - code_challenge_method text, - CONSTRAINT oauth_access_grants_code_challenge CHECK ((char_length(code_challenge) <= 128)), - CONSTRAINT oauth_access_grants_code_challenge_method CHECK ((char_length(code_challenge_method) <= 5)) -); +ALTER TABLE ONLY vulnerability_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_statistics_id_seq'::regclass); -CREATE SEQUENCE oauth_access_grants_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY vulnerability_user_mentions ALTER COLUMN id SET DEFAULT nextval('vulnerability_user_mentions_id_seq'::regclass); -ALTER SEQUENCE oauth_access_grants_id_seq OWNED BY oauth_access_grants.id; +ALTER TABLE ONLY web_hook_logs ALTER COLUMN id SET DEFAULT nextval('web_hook_logs_id_seq'::regclass); -CREATE TABLE oauth_access_tokens ( - id integer NOT NULL, - resource_owner_id integer, - application_id integer, - token character varying NOT NULL, - refresh_token character varying, - expires_in integer, - revoked_at timestamp without time zone, - created_at timestamp without time zone NOT NULL, - scopes character varying -); +ALTER TABLE ONLY web_hooks ALTER COLUMN id SET DEFAULT nextval('web_hooks_id_seq'::regclass); -CREATE SEQUENCE oauth_access_tokens_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY webauthn_registrations ALTER COLUMN id SET DEFAULT nextval('webauthn_registrations_id_seq'::regclass); -ALTER SEQUENCE oauth_access_tokens_id_seq OWNED BY oauth_access_tokens.id; +ALTER TABLE ONLY wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('wiki_page_meta_id_seq'::regclass); -CREATE TABLE oauth_applications ( - id integer NOT NULL, - name character varying NOT NULL, - uid character varying NOT NULL, - secret character varying NOT NULL, - redirect_uri text NOT NULL, - scopes character varying DEFAULT ''::character varying NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - owner_id integer, - owner_type character varying, - trusted boolean DEFAULT false NOT NULL, - confidential boolean DEFAULT true NOT NULL -); +ALTER TABLE ONLY wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('wiki_page_slugs_id_seq'::regclass); -CREATE SEQUENCE oauth_applications_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_types_id_seq'::regclass); -ALTER SEQUENCE oauth_applications_id_seq OWNED BY oauth_applications.id; +ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass); -CREATE TABLE oauth_openid_requests ( - id integer NOT NULL, - access_grant_id integer NOT NULL, - nonce character varying NOT NULL -); +ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass); -CREATE SEQUENCE oauth_openid_requests_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY x509_issuers ALTER COLUMN id SET DEFAULT nextval('x509_issuers_id_seq'::regclass); -ALTER SEQUENCE oauth_openid_requests_id_seq OWNED BY oauth_openid_requests.id; +ALTER TABLE ONLY zentao_tracker_data ALTER COLUMN id SET DEFAULT nextval('zentao_tracker_data_id_seq'::regclass); -CREATE TABLE onboarding_progresses ( - id bigint NOT NULL, - namespace_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - git_pull_at timestamp with time zone, - git_write_at timestamp with time zone, - merge_request_created_at timestamp with time zone, - pipeline_created_at timestamp with time zone, - user_added_at timestamp with time zone, - trial_started_at timestamp with time zone, - subscription_created_at timestamp with time zone, - required_mr_approvals_enabled_at timestamp with time zone, - code_owners_enabled_at timestamp with time zone, - scoped_label_created_at timestamp with time zone, - security_scan_enabled_at timestamp with time zone, - 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 -); +ALTER TABLE ONLY zoom_meetings ALTER COLUMN id SET DEFAULT nextval('zoom_meetings_id_seq'::regclass); -CREATE SEQUENCE onboarding_progresses_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY audit_events + ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE onboarding_progresses_id_seq OWNED BY onboarding_progresses.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_000000 + ADD CONSTRAINT audit_events_000000_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202212 + ADD CONSTRAINT audit_events_202212_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202301 + ADD CONSTRAINT audit_events_202301_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202302 + ADD CONSTRAINT audit_events_202302_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202303 + ADD CONSTRAINT audit_events_202303_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202304 + ADD CONSTRAINT audit_events_202304_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202305 + ADD CONSTRAINT audit_events_202305_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202306 + ADD CONSTRAINT audit_events_202306_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202307 + ADD CONSTRAINT audit_events_202307_pkey PRIMARY KEY (id, created_at); -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) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202308 + ADD CONSTRAINT audit_events_202308_pkey PRIMARY KEY (id, created_at); -CREATE SEQUENCE open_project_tracker_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202309 + ADD CONSTRAINT audit_events_202309_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE open_project_tracker_data_id_seq OWNED BY open_project_tracker_data.id; +ALTER TABLE ONLY batched_background_migration_job_transition_logs + ADD CONSTRAINT batched_background_migration_job_transition_logs_pkey PRIMARY KEY (id, created_at); -CREATE TABLE operations_feature_flag_scopes ( - id bigint NOT NULL, - feature_flag_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - active boolean NOT NULL, - environment_scope character varying DEFAULT '*'::character varying NOT NULL, - strategies jsonb DEFAULT '[{"name": "default", "parameters": {}}]'::jsonb NOT NULL -); +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); -CREATE SEQUENCE operations_feature_flag_scopes_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE operations_feature_flag_scopes_id_seq OWNED BY operations_feature_flag_scopes.id; +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); -CREATE TABLE operations_feature_flags ( - id bigint NOT NULL, - project_id integer NOT NULL, - active boolean NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - name character varying NOT NULL, - description text, - iid integer NOT NULL, - version smallint DEFAULT 1 NOT NULL -); +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); -CREATE TABLE operations_feature_flags_clients ( - id bigint NOT NULL, - project_id integer NOT NULL, - token_encrypted character varying -); +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); -CREATE SEQUENCE operations_feature_flags_clients_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE operations_feature_flags_clients_id_seq OWNED BY operations_feature_flags_clients.id; +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); -CREATE SEQUENCE operations_feature_flags_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE operations_feature_flags_id_seq OWNED BY operations_feature_flags.id; +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); -CREATE TABLE operations_feature_flags_issues ( - id bigint NOT NULL, - feature_flag_id bigint NOT NULL, - issue_id bigint NOT NULL -); +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); -CREATE SEQUENCE operations_feature_flags_issues_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_pending_alert_escalations + ADD CONSTRAINT incident_management_pending_alert_escalations_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE operations_feature_flags_issues_id_seq OWNED BY operations_feature_flags_issues.id; +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); -CREATE TABLE operations_scopes ( - id bigint NOT NULL, - strategy_id bigint NOT NULL, - environment_scope character varying(255) NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 + ADD CONSTRAINT incident_management_pending_alert_escalations_202302_pkey PRIMARY KEY (id, process_at); -CREATE SEQUENCE operations_scopes_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 + ADD CONSTRAINT incident_management_pending_alert_escalations_202303_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE operations_scopes_id_seq OWNED BY operations_scopes.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 + ADD CONSTRAINT incident_management_pending_alert_escalations_202304_pkey PRIMARY KEY (id, process_at); -CREATE TABLE operations_strategies ( - id bigint NOT NULL, - feature_flag_id bigint NOT NULL, - name character varying(255) NOT NULL, - parameters jsonb DEFAULT '{}'::jsonb NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 + ADD CONSTRAINT incident_management_pending_alert_escalations_202305_pkey PRIMARY KEY (id, process_at); -CREATE SEQUENCE operations_strategies_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 + ADD CONSTRAINT incident_management_pending_alert_escalations_202306_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE operations_strategies_id_seq OWNED BY operations_strategies.id; +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); -CREATE TABLE operations_strategies_user_lists ( - id bigint NOT NULL, - strategy_id bigint NOT NULL, - user_list_id bigint NOT NULL -); +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); -CREATE SEQUENCE operations_strategies_user_lists_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE operations_strategies_user_lists_id_seq OWNED BY operations_strategies_user_lists.id; +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); -CREATE TABLE operations_user_lists ( - 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, - iid integer NOT NULL, - name character varying(255) NOT NULL, - user_xids text DEFAULT ''::text NOT NULL -); +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); -CREATE SEQUENCE operations_user_lists_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_pending_issue_escalations + ADD CONSTRAINT incident_management_pending_issue_escalations_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE operations_user_lists_id_seq OWNED BY operations_user_lists.id; +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); -CREATE TABLE packages_build_infos ( - id bigint NOT NULL, - package_id integer NOT NULL, - pipeline_id integer -); +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 + ADD CONSTRAINT incident_management_pending_issue_escalations_202302_pkey PRIMARY KEY (id, process_at); -CREATE SEQUENCE packages_build_infos_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 + ADD CONSTRAINT incident_management_pending_issue_escalations_202303_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE packages_build_infos_id_seq OWNED BY packages_build_infos.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 + ADD CONSTRAINT incident_management_pending_issue_escalations_202304_pkey PRIMARY KEY (id, process_at); -CREATE TABLE packages_composer_cache_files ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - delete_at timestamp with time zone, - namespace_id integer, - file_store smallint DEFAULT 1 NOT NULL, - file text NOT NULL, - file_sha256 bytea NOT NULL, - CONSTRAINT check_84f5ba81f5 CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 + ADD CONSTRAINT incident_management_pending_issue_escalations_202305_pkey PRIMARY KEY (id, process_at); -CREATE SEQUENCE packages_composer_cache_files_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 + ADD CONSTRAINT incident_management_pending_issue_escalations_202306_pkey PRIMARY KEY (id, process_at); -ALTER SEQUENCE packages_composer_cache_files_id_seq OWNED BY packages_composer_cache_files.id; +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); -CREATE TABLE packages_composer_metadata ( - package_id bigint NOT NULL, - target_sha bytea NOT NULL, - composer_json jsonb DEFAULT '{}'::jsonb NOT NULL, - version_cache_sha bytea -); +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); -CREATE TABLE packages_conan_file_metadata ( - id bigint NOT NULL, - package_file_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - recipe_revision character varying(255) DEFAULT '0'::character varying NOT NULL, - package_revision character varying(255), - conan_package_reference character varying(255), - conan_file_type smallint NOT NULL -); +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); -CREATE SEQUENCE packages_conan_file_metadata_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY loose_foreign_keys_deleted_records + ADD CONSTRAINT loose_foreign_keys_deleted_records_pkey PRIMARY KEY (partition, id); -ALTER SEQUENCE packages_conan_file_metadata_id_seq OWNED BY packages_conan_file_metadata.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 + ADD CONSTRAINT loose_foreign_keys_deleted_records_1_pkey PRIMARY KEY (partition, id); -CREATE TABLE packages_conan_metadata ( - id bigint NOT NULL, - package_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - package_username character varying(255) NOT NULL, - package_channel character varying(255) NOT NULL -); +ALTER TABLE ONLY verification_codes + ADD CONSTRAINT verification_codes_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE SEQUENCE packages_conan_metadata_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE packages_conan_metadata_id_seq OWNED BY packages_conan_metadata.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202302 + ADD CONSTRAINT verification_codes_202302_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE TABLE packages_debian_file_metadata ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - package_file_id bigint NOT NULL, - file_type smallint NOT NULL, - component text, - architecture text, - fields jsonb, - CONSTRAINT check_2ebedda4b6 CHECK ((char_length(component) <= 255)), - CONSTRAINT check_e6e1fffcca CHECK ((char_length(architecture) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202303 + ADD CONSTRAINT verification_codes_202303_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE TABLE packages_debian_group_architectures ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_ddb220164a CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202304 + ADD CONSTRAINT verification_codes_202304_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE SEQUENCE packages_debian_group_architectures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE packages_debian_group_architectures_id_seq OWNED BY packages_debian_group_architectures.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202306 + ADD CONSTRAINT verification_codes_202306_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE TABLE packages_debian_group_component_files ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - component_id bigint NOT NULL, - architecture_id bigint, - size integer NOT NULL, - file_type smallint NOT NULL, - compression_type smallint, - file_store smallint DEFAULT 1 NOT NULL, - file text NOT NULL, - file_md5 bytea NOT NULL, - file_sha256 bytea NOT NULL, - CONSTRAINT check_839e1685bc CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202307 + ADD CONSTRAINT verification_codes_202307_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE SEQUENCE packages_debian_group_component_files_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +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 SEQUENCE packages_debian_group_component_files_id_seq OWNED BY packages_debian_group_component_files.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202309 + ADD CONSTRAINT verification_codes_202309_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone); -CREATE TABLE packages_debian_group_components ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_a9bc7d85be CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_000000 + ADD CONSTRAINT web_hook_logs_000000_pkey PRIMARY KEY (id, created_at); -CREATE SEQUENCE packages_debian_group_components_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY web_hook_logs + ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE packages_debian_group_components_id_seq OWNED BY packages_debian_group_components.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202212 + ADD CONSTRAINT web_hook_logs_202212_pkey PRIMARY KEY (id, created_at); -CREATE TABLE packages_debian_group_distribution_keys ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - encrypted_private_key text NOT NULL, - encrypted_private_key_iv text NOT NULL, - encrypted_passphrase text NOT NULL, - encrypted_passphrase_iv text NOT NULL, - public_key text NOT NULL, - fingerprint text NOT NULL, - CONSTRAINT check_bc95dc3fbe CHECK ((char_length(fingerprint) <= 255)), - CONSTRAINT check_f708183491 CHECK ((char_length(public_key) <= 524288)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202301 + ADD CONSTRAINT web_hook_logs_202301_pkey PRIMARY KEY (id, created_at); -CREATE SEQUENCE packages_debian_group_distribution_keys_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202302 + ADD CONSTRAINT web_hook_logs_202302_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE packages_debian_group_distribution_keys_id_seq OWNED BY packages_debian_group_distribution_keys.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202303 + ADD CONSTRAINT web_hook_logs_202303_pkey PRIMARY KEY (id, created_at); -CREATE TABLE packages_debian_group_distributions ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id bigint NOT NULL, - creator_id bigint, - valid_time_duration_seconds integer, - file_store smallint DEFAULT 1 NOT NULL, - automatic boolean DEFAULT true NOT NULL, - automatic_upgrades boolean DEFAULT false NOT NULL, - codename text NOT NULL, - suite text, - origin text, - label text, - version text, - description text, - file text, - file_signature text, - signed_file text, - signed_file_store smallint DEFAULT 1 NOT NULL, - CONSTRAINT check_0007e0bf61 CHECK ((char_length(signed_file) <= 255)), - CONSTRAINT check_310ac457b8 CHECK ((char_length(description) <= 255)), - CONSTRAINT check_3d6f87fc31 CHECK ((char_length(file_signature) <= 4096)), - CONSTRAINT check_3fdadf4a0c CHECK ((char_length(version) <= 255)), - CONSTRAINT check_590e18405a CHECK ((char_length(codename) <= 255)), - CONSTRAINT check_b057cd840a CHECK ((char_length(origin) <= 255)), - CONSTRAINT check_be5ed8d307 CHECK ((char_length(file) <= 255)), - CONSTRAINT check_d3244bfc0b CHECK ((char_length(label) <= 255)), - CONSTRAINT check_e7c928a24b CHECK ((char_length(suite) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202304 + ADD CONSTRAINT web_hook_logs_202304_pkey PRIMARY KEY (id, created_at); -CREATE SEQUENCE packages_debian_group_distributions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202305 + ADD CONSTRAINT web_hook_logs_202305_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE packages_debian_group_distributions_id_seq OWNED BY packages_debian_group_distributions.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202306 + ADD CONSTRAINT web_hook_logs_202306_pkey PRIMARY KEY (id, created_at); -CREATE TABLE packages_debian_project_architectures ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_9c2e1c99d8 CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202307 + ADD CONSTRAINT web_hook_logs_202307_pkey PRIMARY KEY (id, created_at); -CREATE SEQUENCE packages_debian_project_architectures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202308 + ADD CONSTRAINT web_hook_logs_202308_pkey PRIMARY KEY (id, created_at); -ALTER SEQUENCE packages_debian_project_architectures_id_seq OWNED BY packages_debian_project_architectures.id; +ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202309 + ADD CONSTRAINT web_hook_logs_202309_pkey PRIMARY KEY (id, created_at); -CREATE TABLE packages_debian_project_component_files ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - component_id bigint NOT NULL, - architecture_id bigint, - size integer NOT NULL, - file_type smallint NOT NULL, - compression_type smallint, - file_store smallint DEFAULT 1 NOT NULL, - file text NOT NULL, - file_md5 bytea NOT NULL, - file_sha256 bytea NOT NULL, - CONSTRAINT check_e5af03fa2d CHECK ((char_length(file) <= 255)) -); +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); -CREATE SEQUENCE packages_debian_project_component_files_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_00_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_debian_project_component_files_id_seq OWNED BY packages_debian_project_component_files.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_01_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_debian_project_components ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_517559f298 CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_02_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_debian_project_components_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_03_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_debian_project_components_id_seq OWNED BY packages_debian_project_components.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_04_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_debian_project_distribution_keys ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - distribution_id bigint NOT NULL, - encrypted_private_key text NOT NULL, - encrypted_private_key_iv text NOT NULL, - encrypted_passphrase text NOT NULL, - encrypted_passphrase_iv text NOT NULL, - public_key text NOT NULL, - fingerprint text NOT NULL, - CONSTRAINT check_9e8a5eef0a CHECK ((char_length(fingerprint) <= 255)), - CONSTRAINT check_d188f6547f CHECK ((char_length(public_key) <= 524288)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_05_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_debian_project_distribution_keys_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_06_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_debian_project_distribution_keys_id_seq OWNED BY packages_debian_project_distribution_keys.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_07_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_debian_project_distributions ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - creator_id bigint, - valid_time_duration_seconds integer, - file_store smallint DEFAULT 1 NOT NULL, - automatic boolean DEFAULT true NOT NULL, - automatic_upgrades boolean DEFAULT false NOT NULL, - codename text NOT NULL, - suite text, - origin text, - label text, - version text, - description text, - file text, - file_signature text, - signed_file text, - signed_file_store smallint DEFAULT 1 NOT NULL, - CONSTRAINT check_6177ccd4a6 CHECK ((char_length(origin) <= 255)), - CONSTRAINT check_6f6b55a4c4 CHECK ((char_length(label) <= 255)), - CONSTRAINT check_834dabadb6 CHECK ((char_length(codename) <= 255)), - CONSTRAINT check_96965792c2 CHECK ((char_length(version) <= 255)), - CONSTRAINT check_9e5e22b7ff CHECK ((char_length(signed_file) <= 255)), - CONSTRAINT check_a56ae58a17 CHECK ((char_length(suite) <= 255)), - CONSTRAINT check_a5a2ac6af2 CHECK ((char_length(file_signature) <= 4096)), - CONSTRAINT check_b93154339f CHECK ((char_length(description) <= 255)), - CONSTRAINT check_cb4ac9599e CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_08_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_debian_project_distributions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_09_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_debian_project_distributions_id_seq OWNED BY packages_debian_project_distributions.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_10_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_debian_publications ( - id bigint NOT NULL, - package_id bigint NOT NULL, - distribution_id bigint NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_11_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_debian_publications_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_12_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_debian_publications_id_seq OWNED BY packages_debian_publications.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_13_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_dependencies ( - id bigint NOT NULL, - name character varying(255) NOT NULL, - version_pattern character varying(255) NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_14_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_dependencies_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_15_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_dependencies_id_seq OWNED BY packages_dependencies.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_16_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_dependency_links ( - id bigint NOT NULL, - package_id bigint NOT NULL, - dependency_id bigint NOT NULL, - dependency_type smallint NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_17_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_dependency_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_18_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_dependency_links_id_seq OWNED BY packages_dependency_links.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_19_pkey PRIMARY KEY (stage_event_hash_id, issue_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 -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_20_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_21_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_events_id_seq OWNED BY packages_events.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_22_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_helm_file_metadata ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - package_file_id bigint NOT NULL, - channel text NOT NULL, - metadata jsonb, - CONSTRAINT check_c34067922d CHECK ((char_length(channel) <= 63)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_23_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_maven_metadata ( - id bigint NOT NULL, - package_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - app_group character varying NOT NULL, - app_name character varying NOT NULL, - app_version character varying, - path character varying(512) NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_24_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_maven_metadata_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_25_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_maven_metadata_id_seq OWNED BY packages_maven_metadata.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_26_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_nuget_dependency_link_metadata ( - dependency_link_id bigint NOT NULL, - target_framework text NOT NULL, - CONSTRAINT packages_nuget_dependency_link_metadata_target_framework_constr CHECK ((char_length(target_framework) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_27_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_nuget_metadata ( - package_id bigint NOT NULL, - license_url text, - project_url text, - icon_url text, - CONSTRAINT packages_nuget_metadata_icon_url_constraint CHECK ((char_length(icon_url) <= 255)), - CONSTRAINT packages_nuget_metadata_license_url_constraint CHECK ((char_length(license_url) <= 255)), - CONSTRAINT packages_nuget_metadata_project_url_constraint CHECK ((char_length(project_url) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_28_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_package_file_build_infos ( - id bigint NOT NULL, - package_file_id bigint NOT NULL, - pipeline_id bigint -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_29_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE SEQUENCE packages_package_file_build_infos_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_30_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -ALTER SEQUENCE packages_package_file_build_infos_id_seq OWNED BY packages_package_file_build_infos.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 + ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_31_pkey PRIMARY KEY (stage_event_hash_id, issue_id); -CREATE TABLE packages_package_files ( - id bigint NOT NULL, - package_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - size bigint, - file_store integer DEFAULT 1, - file_md5 bytea, - file_sha1 bytea, - file_name character varying NOT NULL, - file text NOT NULL, - verification_retry_at timestamp with time zone, - verified_at timestamp with time zone, - verification_failure character varying(255), - verification_retry_count integer, - file_sha256 bytea, - verification_checksum bytea, - verification_state smallint DEFAULT 0 NOT NULL, - verification_started_at timestamp with time zone, - CONSTRAINT check_4c5e6bb0b3 CHECK ((file_store IS NOT NULL)) -); +ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE packages_package_files_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_00_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE packages_package_files_id_seq OWNED BY packages_package_files.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_01_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE packages_packages ( - id bigint NOT NULL, - project_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - name character varying NOT NULL, - version character varying, - package_type smallint NOT NULL, - creator_id integer, - status smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_02_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE packages_packages_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_03_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE packages_packages_id_seq OWNED BY packages_packages.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_04_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE packages_pypi_metadata ( - package_id bigint NOT NULL, - required_python text, - CONSTRAINT check_0d9aed55b2 CHECK ((required_python IS NOT NULL)), - CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_05_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE packages_rubygems_metadata ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - package_id bigint NOT NULL, - authors text, - files text, - summary text, - description text, - email text, - homepage text, - licenses text, - metadata text, - author text, - bindir text, - cert_chain text, - executables text, - extensions text, - extra_rdoc_files text, - platform text, - post_install_message text, - rdoc_options text, - require_paths text, - required_ruby_version text, - required_rubygems_version text, - requirements text, - rubygems_version text, - signing_key text, - CONSTRAINT check_0154a18c82 CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_22814c771b CHECK ((char_length(email) <= 255)), - CONSTRAINT check_242293030e CHECK ((char_length(extensions) <= 255)), - CONSTRAINT check_27619a7922 CHECK ((char_length(rubygems_version) <= 255)), - CONSTRAINT check_3d1b6f3a39 CHECK ((char_length(post_install_message) <= 255)), - CONSTRAINT check_545f7606f9 CHECK ((char_length(required_rubygems_version) <= 255)), - CONSTRAINT check_5988451714 CHECK ((char_length(executables) <= 255)), - CONSTRAINT check_5f9c84ea17 CHECK ((char_length(platform) <= 255)), - CONSTRAINT check_64f1cecf05 CHECK ((char_length(requirements) <= 255)), - CONSTRAINT check_6ac7043c50 CHECK ((char_length(extra_rdoc_files) <= 255)), - CONSTRAINT check_6ff3abe325 CHECK ((char_length(cert_chain) <= 255)), - CONSTRAINT check_7cb01436df CHECK ((char_length(licenses) <= 255)), - CONSTRAINT check_8be21d92e7 CHECK ((char_length(summary) <= 1024)), - CONSTRAINT check_946cb96acb CHECK ((char_length(homepage) <= 255)), - CONSTRAINT check_9824fc9efc CHECK ((char_length(bindir) <= 255)), - CONSTRAINT check_994b68eb64 CHECK ((char_length(authors) <= 255)), - CONSTRAINT check_9d42fa48ae CHECK ((char_length(signing_key) <= 255)), - CONSTRAINT check_b0f4f8c853 CHECK ((char_length(files) <= 255)), - CONSTRAINT check_b7b296b420 CHECK ((char_length(author) <= 255)), - CONSTRAINT check_bf16b21a47 CHECK ((char_length(rdoc_options) <= 255)), - CONSTRAINT check_ca641a3354 CHECK ((char_length(required_ruby_version) <= 255)), - CONSTRAINT check_ea02f4800f CHECK ((char_length(metadata) <= 30000)), - CONSTRAINT check_f76bad1a9a CHECK ((char_length(require_paths) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_06_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE packages_tags ( - id bigint NOT NULL, - package_id integer NOT NULL, - name character varying(255) NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_07_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE packages_tags_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_08_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE packages_tags_id_seq OWNED BY packages_tags.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_09_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE pages_deployments ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - ci_build_id bigint, - file_store smallint NOT NULL, - file text NOT NULL, - file_count integer NOT NULL, - file_sha256 bytea NOT NULL, - size bigint, - CONSTRAINT check_5f9132a958 CHECK ((size IS NOT NULL)), - CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_10_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE pages_deployments_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_11_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE pages_deployments_id_seq OWNED BY pages_deployments.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_12_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE pages_domain_acme_orders ( - id bigint NOT NULL, - pages_domain_id integer NOT NULL, - expires_at timestamp with time zone NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - url character varying NOT NULL, - challenge_token character varying NOT NULL, - challenge_file_content text NOT NULL, - encrypted_private_key text NOT NULL, - encrypted_private_key_iv text NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_13_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE pages_domain_acme_orders_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_14_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE pages_domain_acme_orders_id_seq OWNED BY pages_domain_acme_orders.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_15_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE pages_domains ( - id integer NOT NULL, - project_id integer, - certificate text, - encrypted_key text, - encrypted_key_iv character varying, - encrypted_key_salt character varying, - domain character varying, - verified_at timestamp with time zone, - verification_code character varying NOT NULL, - enabled_until timestamp with time zone, - remove_at timestamp with time zone, - auto_ssl_enabled boolean DEFAULT false NOT NULL, - certificate_valid_not_before timestamp with time zone, - certificate_valid_not_after timestamp with time zone, - certificate_source smallint DEFAULT 0 NOT NULL, - wildcard boolean DEFAULT false NOT NULL, - usage smallint DEFAULT 0 NOT NULL, - scope smallint DEFAULT 2, - auto_ssl_failed boolean DEFAULT false NOT NULL, - CONSTRAINT check_ab7cf26a46 CHECK ((scope IS NOT NULL)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_16_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE pages_domains_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_17_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_18_pkey PRIMARY KEY (stage_event_hash_id, merge_request_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)) -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_19_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE partitioned_foreign_keys_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_20_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE partitioned_foreign_keys_id_seq OWNED BY partitioned_foreign_keys.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_21_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE path_locks ( - id integer NOT NULL, - path character varying NOT NULL, - project_id integer, - user_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_22_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE path_locks_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_23_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE path_locks_id_seq OWNED BY path_locks.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_24_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE personal_access_tokens ( - id integer NOT NULL, - user_id integer NOT NULL, - name character varying NOT NULL, - revoked boolean DEFAULT false, - expires_at date, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - scopes character varying DEFAULT '--- [] -'::character varying NOT NULL, - impersonation boolean DEFAULT false NOT NULL, - token_digest character varying, - expire_notification_delivered boolean DEFAULT false NOT NULL, - last_used_at timestamp with time zone, - after_expiry_notification_delivered boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_25_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE SEQUENCE personal_access_tokens_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_26_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -ALTER SEQUENCE personal_access_tokens_id_seq OWNED BY personal_access_tokens.id; +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_27_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); -CREATE TABLE plan_limits ( - plan_id bigint NOT NULL, - ci_active_pipelines integer DEFAULT 0 NOT NULL, - ci_pipeline_size integer DEFAULT 0 NOT NULL, - ci_active_jobs integer DEFAULT 0 NOT NULL, - id bigint NOT NULL, - project_hooks integer DEFAULT 100 NOT NULL, - group_hooks integer DEFAULT 50 NOT NULL, - ci_project_subscriptions integer DEFAULT 2 NOT NULL, - ci_pipeline_schedules integer DEFAULT 10 NOT NULL, - offset_pagination_limit integer DEFAULT 50000 NOT NULL, - ci_instance_level_variables integer DEFAULT 25 NOT NULL, - ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL, - ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_junit integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_sast integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_dependency_scanning integer DEFAULT 350 NOT NULL, - ci_max_artifact_size_container_scanning integer DEFAULT 150 NOT NULL, - ci_max_artifact_size_dast integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_codequality integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_license_management integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_license_scanning integer DEFAULT 100 NOT NULL, - ci_max_artifact_size_performance integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_metrics integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_metrics_referee integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_network_referee integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_dotenv integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_cobertura integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_terraform integer DEFAULT 5 NOT NULL, - ci_max_artifact_size_accessibility integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_cluster_applications integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_secret_detection integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_requirements integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_coverage_fuzzing integer DEFAULT 0 NOT NULL, - storage_size_limit integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_browser_performance integer DEFAULT 0 NOT NULL, - ci_max_artifact_size_load_performance integer DEFAULT 0 NOT NULL, - ci_needs_size_limit integer DEFAULT 50 NOT NULL, - conan_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, - maven_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, - npm_max_file_size bigint DEFAULT 524288000 NOT NULL, - nuget_max_file_size bigint DEFAULT 524288000 NOT NULL, - pypi_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, - generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL, - project_feature_flags integer DEFAULT 200 NOT NULL, - golang_max_file_size bigint DEFAULT 104857600 NOT NULL, - debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, - ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL, - daily_invites integer DEFAULT 0 NOT NULL, - ci_pipeline_deployments integer DEFAULT 500 NOT NULL, - pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL, - rubygems_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, - terraform_module_max_file_size bigint DEFAULT 1073741824 NOT NULL, - helm_max_file_size bigint DEFAULT 5242880 NOT NULL, - ci_registered_group_runners integer DEFAULT 1000 NOT NULL, - ci_registered_project_runners integer DEFAULT 1000 NOT NULL, - web_hook_calls integer DEFAULT 0 NOT NULL, - ci_daily_pipeline_schedule_triggers integer DEFAULT 0 NOT NULL, - 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 -); +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_28_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); + +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_29_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); + +ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 + ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_30_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); + +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); -CREATE SEQUENCE plan_limits_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_06 + ADD CONSTRAINT issue_search_data_06_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE plan_limits_id_seq OWNED BY plan_limits.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_07 + ADD CONSTRAINT issue_search_data_07_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE plans ( - id integer NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - name character varying, - title character varying -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_08 + ADD CONSTRAINT issue_search_data_08_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE plans_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_09 + ADD CONSTRAINT issue_search_data_09_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE plans_id_seq OWNED BY plans.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_10 + ADD CONSTRAINT issue_search_data_10_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE pool_repositories ( - id bigint NOT NULL, - shard_id integer NOT NULL, - disk_path character varying, - state character varying, - source_project_id integer -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_11 + ADD CONSTRAINT issue_search_data_11_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE pool_repositories_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_12 + ADD CONSTRAINT issue_search_data_12_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE pool_repositories_id_seq OWNED BY pool_repositories.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_13 + ADD CONSTRAINT issue_search_data_13_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE postgres_async_indexes ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - name text NOT NULL, - definition text NOT NULL, - table_name text NOT NULL, - CONSTRAINT check_083b21157b CHECK ((char_length(definition) <= 2048)), - CONSTRAINT check_b732c6cd1d CHECK ((char_length(name) <= 63)), - CONSTRAINT check_e64ff4359e CHECK ((char_length(table_name) <= 63)) -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_14 + ADD CONSTRAINT issue_search_data_14_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE postgres_async_indexes_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_15 + ADD CONSTRAINT issue_search_data_15_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE postgres_async_indexes_id_seq OWNED BY postgres_async_indexes.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_16 + ADD CONSTRAINT issue_search_data_16_pkey PRIMARY KEY (project_id, issue_id); -CREATE VIEW postgres_foreign_keys AS - SELECT pg_constraint.oid, - pg_constraint.conname AS name, - (((constrained_namespace.nspname)::text || '.'::text) || (constrained_table.relname)::text) AS constrained_table_identifier, - (((referenced_namespace.nspname)::text || '.'::text) || (referenced_table.relname)::text) AS referenced_table_identifier - FROM ((((pg_constraint - JOIN pg_class constrained_table ON ((constrained_table.oid = pg_constraint.conrelid))) - JOIN pg_class referenced_table ON ((referenced_table.oid = pg_constraint.confrelid))) - JOIN pg_namespace constrained_namespace ON ((constrained_table.relnamespace = constrained_namespace.oid))) - JOIN pg_namespace referenced_namespace ON ((referenced_table.relnamespace = referenced_namespace.oid))) - WHERE (pg_constraint.contype = 'f'::"char"); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_17 + ADD CONSTRAINT issue_search_data_17_pkey PRIMARY KEY (project_id, issue_id); -CREATE VIEW postgres_index_bloat_estimates AS - SELECT (((relation_stats.nspname)::text || '.'::text) || (relation_stats.idxname)::text) AS identifier, - ( - CASE - WHEN ((relation_stats.relpages)::double precision > relation_stats.est_pages_ff) THEN ((relation_stats.bs)::double precision * ((relation_stats.relpages)::double precision - relation_stats.est_pages_ff)) - ELSE (0)::double precision - END)::bigint AS bloat_size_bytes - FROM ( SELECT COALESCE(((1)::double precision + ceil((rows_hdr_pdg_stats.reltuples / floor((((((rows_hdr_pdg_stats.bs - (rows_hdr_pdg_stats.pageopqdata)::numeric) - (rows_hdr_pdg_stats.pagehdr)::numeric) * (rows_hdr_pdg_stats.fillfactor)::numeric))::double precision / ((100)::double precision * (((4)::numeric + rows_hdr_pdg_stats.nulldatahdrwidth))::double precision)))))), (0)::double precision) AS est_pages_ff, - rows_hdr_pdg_stats.bs, - rows_hdr_pdg_stats.nspname, - rows_hdr_pdg_stats.tblname, - rows_hdr_pdg_stats.idxname, - rows_hdr_pdg_stats.relpages, - rows_hdr_pdg_stats.is_na - FROM ( SELECT rows_data_stats.maxalign, - rows_data_stats.bs, - rows_data_stats.nspname, - rows_data_stats.tblname, - rows_data_stats.idxname, - rows_data_stats.reltuples, - rows_data_stats.relpages, - rows_data_stats.idxoid, - rows_data_stats.fillfactor, - (((((((rows_data_stats.index_tuple_hdr_bm + rows_data_stats.maxalign) - - CASE - WHEN ((rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign - ELSE (rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) - END))::double precision + rows_data_stats.nulldatawidth) + (rows_data_stats.maxalign)::double precision) - ( - CASE - WHEN (rows_data_stats.nulldatawidth = (0)::double precision) THEN 0 - WHEN (((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign - ELSE ((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) - END)::double precision))::numeric AS nulldatahdrwidth, - rows_data_stats.pagehdr, - rows_data_stats.pageopqdata, - rows_data_stats.is_na - FROM ( SELECT n.nspname, - i.tblname, - i.idxname, - i.reltuples, - i.relpages, - i.idxoid, - i.fillfactor, - (current_setting('block_size'::text))::numeric AS bs, - CASE - WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 - ELSE 4 - END AS maxalign, - 24 AS pagehdr, - 16 AS pageopqdata, - CASE - WHEN (max(COALESCE(s.null_frac, (0)::real)) = (0)::double precision) THEN 2 - ELSE (2 + (((32 + 8) - 1) / 8)) - END AS index_tuple_hdr_bm, - sum((((1)::double precision - COALESCE(s.null_frac, (0)::real)) * (COALESCE(s.avg_width, 1024))::double precision)) AS nulldatawidth, - (max( - CASE - WHEN (i.atttypid = ('name'::regtype)::oid) THEN 1 - ELSE 0 - END) > 0) AS is_na - FROM ((( SELECT ct.relname AS tblname, - ct.relnamespace, - ic.idxname, - ic.attpos, - ic.indkey, - ic.indkey[ic.attpos] AS indkey, - ic.reltuples, - ic.relpages, - ic.tbloid, - ic.idxoid, - ic.fillfactor, - COALESCE(a1.attnum, a2.attnum) AS attnum, - COALESCE(a1.attname, a2.attname) AS attname, - COALESCE(a1.atttypid, a2.atttypid) AS atttypid, -CASE - WHEN (a1.attnum IS NULL) THEN ic.idxname - ELSE ct.relname -END AS attrelname - FROM (((( SELECT idx_data.idxname, - idx_data.reltuples, - idx_data.relpages, - idx_data.tbloid, - idx_data.idxoid, - idx_data.fillfactor, - idx_data.indkey, - generate_series(1, (idx_data.indnatts)::integer) AS attpos - FROM ( SELECT ci.relname AS idxname, - ci.reltuples, - ci.relpages, - i_1.indrelid AS tbloid, - i_1.indexrelid AS idxoid, - COALESCE((("substring"(array_to_string(ci.reloptions, ' '::text), 'fillfactor=([0-9]+)'::text))::smallint)::integer, 90) AS fillfactor, - i_1.indnatts, - (string_to_array(textin(int2vectorout(i_1.indkey)), ' '::text))::integer[] AS indkey - FROM (pg_index i_1 - JOIN pg_class ci ON ((ci.oid = i_1.indexrelid))) - WHERE ((ci.relam = ( SELECT pg_am.oid - FROM pg_am - WHERE (pg_am.amname = 'btree'::name))) AND (ci.relpages > 0))) idx_data) ic - JOIN pg_class ct ON ((ct.oid = ic.tbloid))) - LEFT JOIN pg_attribute a1 ON (((ic.indkey[ic.attpos] <> 0) AND (a1.attrelid = ic.tbloid) AND (a1.attnum = ic.indkey[ic.attpos])))) - LEFT JOIN pg_attribute a2 ON (((ic.indkey[ic.attpos] = 0) AND (a2.attrelid = ic.idxoid) AND (a2.attnum = ic.attpos))))) i(tblname, relnamespace, idxname, attpos, indkey, indkey_1, reltuples, relpages, tbloid, idxoid, fillfactor, attnum, attname, atttypid, attrelname) - JOIN pg_namespace n ON ((n.oid = i.relnamespace))) - JOIN pg_stats s ON (((s.schemaname = n.nspname) AND (s.tablename = i.attrelname) AND (s.attname = i.attname)))) - GROUP BY n.nspname, i.tblname, i.idxname, i.reltuples, i.relpages, i.idxoid, i.fillfactor, (current_setting('block_size'::text))::numeric, - CASE - WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 - ELSE 4 - END, 24::integer, 16::integer) rows_data_stats) rows_hdr_pdg_stats) relation_stats - WHERE ((relation_stats.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])) AND (NOT relation_stats.is_na)) - ORDER BY relation_stats.nspname, relation_stats.tblname, relation_stats.idxname; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_18 + ADD CONSTRAINT issue_search_data_18_pkey PRIMARY KEY (project_id, issue_id); -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]))); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_19 + ADD CONSTRAINT issue_search_data_19_pkey PRIMARY KEY (project_id, issue_id); -CREATE VIEW postgres_partitioned_tables AS - SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, - pg_class.oid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - CASE partitioned_tables.partstrat - WHEN 'l'::"char" THEN 'list'::text - WHEN 'r'::"char" THEN 'range'::text - WHEN 'h'::"char" THEN 'hash'::text - ELSE NULL::text - END AS strategy, - array_agg(pg_attribute.attname) AS key_columns - FROM (((( SELECT pg_partitioned_table.partrelid, - pg_partitioned_table.partstrat, - unnest(pg_partitioned_table.partattrs) AS column_position - FROM pg_partitioned_table) partitioned_tables - JOIN pg_class ON ((partitioned_tables.partrelid = pg_class.oid))) - JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid))) - JOIN pg_attribute ON (((pg_attribute.attrelid = pg_class.oid) AND (pg_attribute.attnum = partitioned_tables.column_position)))) - WHERE (pg_namespace.nspname = "current_schema"()) - GROUP BY (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text), pg_class.oid, pg_namespace.nspname, pg_class.relname, - CASE partitioned_tables.partstrat - WHEN 'l'::"char" THEN 'list'::text - WHEN 'r'::"char" THEN 'range'::text - WHEN 'h'::"char" THEN 'hash'::text - ELSE NULL::text - END; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_20 + ADD CONSTRAINT issue_search_data_20_pkey PRIMARY KEY (project_id, issue_id); -CREATE VIEW postgres_partitions AS - SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, - pg_class.oid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - (((parent_namespace.nspname)::text || '.'::text) || (parent_class.relname)::text) AS parent_identifier, - pg_get_expr(pg_class.relpartbound, pg_inherits.inhrelid) AS condition - FROM ((((pg_class - JOIN pg_namespace ON ((pg_namespace.oid = pg_class.relnamespace))) - JOIN pg_inherits ON ((pg_class.oid = pg_inherits.inhrelid))) - JOIN pg_class parent_class ON ((pg_inherits.inhparent = parent_class.oid))) - JOIN pg_namespace parent_namespace ON ((parent_class.relnamespace = parent_namespace.oid))) - WHERE (pg_class.relispartition AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]))); +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); -CREATE TABLE postgres_reindex_actions ( - id bigint NOT NULL, - action_start timestamp with time zone NOT NULL, - action_end timestamp with time zone, - ondisk_size_bytes_start bigint NOT NULL, - ondisk_size_bytes_end bigint, - state smallint DEFAULT 0 NOT NULL, - index_identifier text NOT NULL, - bloat_estimate_bytes_start bigint, - CONSTRAINT check_f12527622c CHECK ((char_length(index_identifier) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_42 + ADD CONSTRAINT issue_search_data_42_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE postgres_reindex_actions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_43 + ADD CONSTRAINT issue_search_data_43_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE postgres_reindex_actions_id_seq OWNED BY postgres_reindex_actions.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_44 + ADD CONSTRAINT issue_search_data_44_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE programming_languages ( - id integer NOT NULL, - name character varying NOT NULL, - color character varying NOT NULL, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_45 + ADD CONSTRAINT issue_search_data_45_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE programming_languages_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_46 + ADD CONSTRAINT issue_search_data_46_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE programming_languages_id_seq OWNED BY programming_languages.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_47 + ADD CONSTRAINT issue_search_data_47_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_access_tokens ( - personal_access_token_id bigint NOT NULL, - project_id bigint NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_48 + ADD CONSTRAINT issue_search_data_48_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_alerting_settings ( - project_id integer NOT NULL, - encrypted_token character varying NOT NULL, - encrypted_token_iv character varying NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_49 + ADD CONSTRAINT issue_search_data_49_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_aliases ( - id bigint NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_50 + ADD CONSTRAINT issue_search_data_50_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE project_aliases_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_51 + ADD CONSTRAINT issue_search_data_51_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE project_aliases_id_seq OWNED BY project_aliases.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_52 + ADD CONSTRAINT issue_search_data_52_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_authorizations ( - user_id integer NOT NULL, - project_id integer NOT NULL, - access_level integer NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_53 + ADD CONSTRAINT issue_search_data_53_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_auto_devops ( - id integer NOT NULL, - project_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - enabled boolean, - deploy_strategy integer DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_54 + ADD CONSTRAINT issue_search_data_54_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE project_auto_devops_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_55 + ADD CONSTRAINT issue_search_data_55_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE project_auto_devops_id_seq OWNED BY project_auto_devops.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_56 + ADD CONSTRAINT issue_search_data_56_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_ci_cd_settings ( - id integer NOT NULL, - project_id integer NOT NULL, - group_runners_enabled boolean DEFAULT true NOT NULL, - merge_pipelines_enabled boolean, - default_git_depth integer, - forward_deployment_enabled boolean, - merge_trains_enabled boolean DEFAULT false, - 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 -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_57 + ADD CONSTRAINT issue_search_data_57_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE project_ci_cd_settings_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_58 + ADD CONSTRAINT issue_search_data_58_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE project_ci_cd_settings_id_seq OWNED BY project_ci_cd_settings.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_59 + ADD CONSTRAINT issue_search_data_59_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_ci_feature_usages ( - id bigint NOT NULL, - project_id bigint NOT NULL, - feature smallint NOT NULL, - default_branch boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_60 + ADD CONSTRAINT issue_search_data_60_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE project_ci_feature_usages_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_61 + ADD CONSTRAINT issue_search_data_61_pkey PRIMARY KEY (project_id, issue_id); -ALTER SEQUENCE project_ci_feature_usages_id_seq OWNED BY project_ci_feature_usages.id; +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_62 + ADD CONSTRAINT issue_search_data_62_pkey PRIMARY KEY (project_id, issue_id); -CREATE TABLE project_compliance_framework_settings ( - project_id bigint NOT NULL, - framework_id bigint, - CONSTRAINT check_d348de9e2d CHECK ((framework_id IS NOT NULL)) -); +ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_63 + ADD CONSTRAINT issue_search_data_63_pkey PRIMARY KEY (project_id, issue_id); -CREATE SEQUENCE project_compliance_framework_settings_project_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY product_analytics_events_experimental + ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_compliance_framework_settings_project_id_seq OWNED BY project_compliance_framework_settings.project_id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_00 + ADD CONSTRAINT product_analytics_events_experimental_00_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_custom_attributes ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - key character varying NOT NULL, - value character varying NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_01 + ADD CONSTRAINT product_analytics_events_experimental_01_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_custom_attributes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_02 + ADD CONSTRAINT product_analytics_events_experimental_02_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_custom_attributes_id_seq OWNED BY project_custom_attributes.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_03 + ADD CONSTRAINT product_analytics_events_experimental_03_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_daily_statistics ( - id bigint NOT NULL, - project_id integer NOT NULL, - fetch_count integer NOT NULL, - date date -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_04 + ADD CONSTRAINT product_analytics_events_experimental_04_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_daily_statistics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_05 + ADD CONSTRAINT product_analytics_events_experimental_05_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_daily_statistics_id_seq OWNED BY project_daily_statistics.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_06 + ADD CONSTRAINT product_analytics_events_experimental_06_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_deploy_tokens ( - id integer NOT NULL, - project_id integer NOT NULL, - deploy_token_id integer NOT NULL, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_07 + ADD CONSTRAINT product_analytics_events_experimental_07_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_deploy_tokens_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_08 + ADD CONSTRAINT product_analytics_events_experimental_08_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_deploy_tokens_id_seq OWNED BY project_deploy_tokens.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_09 + ADD CONSTRAINT product_analytics_events_experimental_09_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_error_tracking_settings ( - project_id integer NOT NULL, - enabled boolean DEFAULT false NOT NULL, - api_url character varying, - encrypted_token character varying, - encrypted_token_iv character varying, - project_name character varying, - organization_name character varying, - integrated boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_10 + ADD CONSTRAINT product_analytics_events_experimental_10_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_export_jobs ( - 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, - status smallint DEFAULT 0 NOT NULL, - jid character varying(100) NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_11 + ADD CONSTRAINT product_analytics_events_experimental_11_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_export_jobs_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_12 + ADD CONSTRAINT product_analytics_events_experimental_12_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_export_jobs_id_seq OWNED BY project_export_jobs.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_13 + ADD CONSTRAINT product_analytics_events_experimental_13_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_feature_usages ( - project_id integer NOT NULL, - jira_dvcs_cloud_last_sync_at timestamp without time zone, - jira_dvcs_server_last_sync_at timestamp without time zone -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_14 + ADD CONSTRAINT product_analytics_events_experimental_14_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_features ( - id integer NOT NULL, - project_id integer NOT NULL, - merge_requests_access_level integer, - issues_access_level integer, - wiki_access_level integer, - snippets_access_level integer DEFAULT 20 NOT NULL, - builds_access_level integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - repository_access_level integer DEFAULT 20 NOT NULL, - pages_access_level integer NOT NULL, - forking_access_level integer, - metrics_dashboard_access_level integer, - analytics_access_level integer DEFAULT 20 NOT NULL, - requirements_access_level integer DEFAULT 20 NOT NULL, - operations_access_level integer DEFAULT 20 NOT NULL, - security_and_compliance_access_level integer DEFAULT 10 NOT NULL, - container_registry_access_level integer DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_15 + ADD CONSTRAINT product_analytics_events_experimental_15_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_16 + ADD CONSTRAINT product_analytics_events_experimental_16_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_17 + ADD CONSTRAINT product_analytics_events_experimental_17_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_18 + ADD CONSTRAINT product_analytics_events_experimental_18_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_19 + ADD CONSTRAINT product_analytics_events_experimental_19_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_features_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_20 + ADD CONSTRAINT product_analytics_events_experimental_20_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_features_id_seq OWNED BY project_features.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_21 + ADD CONSTRAINT product_analytics_events_experimental_21_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_group_links ( - id integer NOT NULL, - project_id integer NOT NULL, - group_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - group_access integer DEFAULT 30 NOT NULL, - expires_at date -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_22 + ADD CONSTRAINT product_analytics_events_experimental_22_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_group_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_23 + ADD CONSTRAINT product_analytics_events_experimental_23_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_group_links_id_seq OWNED BY project_group_links.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_24 + ADD CONSTRAINT product_analytics_events_experimental_24_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_import_data ( - id integer NOT NULL, - project_id integer, - data text, - encrypted_credentials text, - encrypted_credentials_iv character varying, - encrypted_credentials_salt character varying -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_25 + ADD CONSTRAINT product_analytics_events_experimental_25_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_import_data_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_26 + ADD CONSTRAINT product_analytics_events_experimental_26_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_import_data_id_seq OWNED BY project_import_data.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_27 + ADD CONSTRAINT product_analytics_events_experimental_27_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_incident_management_settings ( - project_id integer NOT NULL, - create_issue boolean DEFAULT false NOT NULL, - send_email boolean DEFAULT false NOT NULL, - issue_template_key text, - pagerduty_active boolean DEFAULT false NOT NULL, - encrypted_pagerduty_token bytea, - encrypted_pagerduty_token_iv bytea, - auto_close_incident boolean DEFAULT true NOT NULL, - sla_timer boolean DEFAULT false, - sla_timer_minutes integer, - CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), - CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_28 + ADD CONSTRAINT product_analytics_events_experimental_28_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_metrics_settings ( - project_id integer NOT NULL, - external_dashboard_url character varying, - dashboard_timezone smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_29 + ADD CONSTRAINT product_analytics_events_experimental_29_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_mirror_data ( - id integer NOT NULL, - project_id integer NOT NULL, - status character varying, - jid character varying, - last_error text, - last_successful_update_at timestamp with time zone, - last_update_at timestamp with time zone, - last_update_scheduled_at timestamp without time zone, - last_update_started_at timestamp without time zone, - next_execution_timestamp timestamp without time zone, - retry_count integer DEFAULT 0 NOT NULL, - correlation_id_value character varying(128) -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_30 + ADD CONSTRAINT product_analytics_events_experimental_30_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_mirror_data_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_31 + ADD CONSTRAINT product_analytics_events_experimental_31_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_mirror_data_id_seq OWNED BY project_mirror_data.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_32 + ADD CONSTRAINT product_analytics_events_experimental_32_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_pages_metadata ( - project_id bigint NOT NULL, - deployed boolean DEFAULT false NOT NULL, - artifacts_archive_id bigint, - pages_deployment_id bigint -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_33 + ADD CONSTRAINT product_analytics_events_experimental_33_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_repositories ( - id bigint NOT NULL, - shard_id integer NOT NULL, - disk_path character varying NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_34 + ADD CONSTRAINT product_analytics_events_experimental_34_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_repositories_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_35 + ADD CONSTRAINT product_analytics_events_experimental_35_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_repositories_id_seq OWNED BY project_repositories.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_36 + ADD CONSTRAINT product_analytics_events_experimental_36_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_repository_states ( - id integer NOT NULL, - project_id integer NOT NULL, - repository_verification_checksum bytea, - wiki_verification_checksum bytea, - last_repository_verification_failure character varying, - last_wiki_verification_failure character varying, - repository_retry_at timestamp with time zone, - wiki_retry_at timestamp with time zone, - repository_retry_count integer, - wiki_retry_count integer, - last_repository_verification_ran_at timestamp with time zone, - last_wiki_verification_ran_at timestamp with time zone -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_37 + ADD CONSTRAINT product_analytics_events_experimental_37_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_repository_states_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_38 + ADD CONSTRAINT product_analytics_events_experimental_38_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_repository_states_id_seq OWNED BY project_repository_states.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_39 + ADD CONSTRAINT product_analytics_events_experimental_39_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_repository_storage_moves ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - state smallint DEFAULT 1 NOT NULL, - source_storage_name text NOT NULL, - destination_storage_name text NOT NULL, - CONSTRAINT project_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), - CONSTRAINT project_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_40 + ADD CONSTRAINT product_analytics_events_experimental_40_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_repository_storage_moves_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_41 + ADD CONSTRAINT product_analytics_events_experimental_41_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_repository_storage_moves_id_seq OWNED BY project_repository_storage_moves.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_42 + ADD CONSTRAINT product_analytics_events_experimental_42_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_security_settings ( - project_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - auto_fix_container_scanning boolean DEFAULT true NOT NULL, - auto_fix_dast boolean DEFAULT true NOT NULL, - auto_fix_dependency_scanning boolean DEFAULT true NOT NULL, - auto_fix_sast boolean DEFAULT true NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_43 + ADD CONSTRAINT product_analytics_events_experimental_43_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_security_settings_project_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_44 + ADD CONSTRAINT product_analytics_events_experimental_44_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_security_settings_project_id_seq OWNED BY project_security_settings.project_id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_45 + ADD CONSTRAINT product_analytics_events_experimental_45_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_settings ( - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - show_default_award_emojis boolean DEFAULT true NOT NULL, - allow_merge_on_skipped_pipeline boolean, - push_rule_id bigint, - squash_option smallint DEFAULT 3, - has_confluence boolean DEFAULT false NOT NULL, - cve_id_request_enabled boolean DEFAULT true NOT NULL, - has_vulnerabilities boolean DEFAULT false NOT NULL, - prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL, - mr_default_target_self boolean DEFAULT false NOT NULL, - previous_default_branch text, - CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)) -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_46 + ADD CONSTRAINT product_analytics_events_experimental_46_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_statistics ( - id integer NOT NULL, - project_id integer NOT NULL, - namespace_id integer NOT NULL, - commit_count bigint DEFAULT 0 NOT NULL, - storage_size bigint DEFAULT 0 NOT NULL, - repository_size bigint DEFAULT 0 NOT NULL, - lfs_objects_size bigint DEFAULT 0 NOT NULL, - build_artifacts_size bigint DEFAULT 0 NOT NULL, - shared_runners_seconds bigint DEFAULT 0 NOT NULL, - shared_runners_seconds_last_reset timestamp without time zone, - packages_size bigint DEFAULT 0 NOT NULL, - wiki_size bigint, - snippets_size bigint, - pipeline_artifacts_size bigint DEFAULT 0 NOT NULL, - uploads_size bigint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_47 + ADD CONSTRAINT product_analytics_events_experimental_47_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_48 + ADD CONSTRAINT product_analytics_events_experimental_48_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_49 + ADD CONSTRAINT product_analytics_events_experimental_49_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_50 + ADD CONSTRAINT product_analytics_events_experimental_50_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_statistics_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_51 + ADD CONSTRAINT product_analytics_events_experimental_51_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_statistics_id_seq OWNED BY project_statistics.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_52 + ADD CONSTRAINT product_analytics_events_experimental_52_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_topics ( - id bigint NOT NULL, - project_id bigint NOT NULL, - topic_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_53 + ADD CONSTRAINT product_analytics_events_experimental_53_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_topics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_54 + ADD CONSTRAINT product_analytics_events_experimental_54_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_topics_id_seq OWNED BY project_topics.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_55 + ADD CONSTRAINT product_analytics_events_experimental_55_pkey PRIMARY KEY (id, project_id); -CREATE TABLE project_tracing_settings ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - external_url character varying NOT NULL -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_56 + ADD CONSTRAINT product_analytics_events_experimental_56_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE project_tracing_settings_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_57 + ADD CONSTRAINT product_analytics_events_experimental_57_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE project_tracing_settings_id_seq OWNED BY project_tracing_settings.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_58 + ADD CONSTRAINT product_analytics_events_experimental_58_pkey PRIMARY KEY (id, project_id); -CREATE TABLE projects ( - id integer NOT NULL, - name character varying, - path character varying, - description text, - created_at timestamp without time zone, - updated_at timestamp without time zone, - creator_id integer, - namespace_id integer NOT NULL, - last_activity_at timestamp without time zone, - import_url character varying, - visibility_level integer DEFAULT 0 NOT NULL, - archived boolean DEFAULT false NOT NULL, - avatar character varying, - star_count integer DEFAULT 0 NOT NULL, - merge_requests_rebase_enabled boolean DEFAULT false, - import_type character varying, - import_source character varying, - merge_requests_ff_only_enabled boolean DEFAULT false NOT NULL, - shared_runners_enabled boolean DEFAULT true NOT NULL, - runners_token character varying, - build_coverage_regex character varying, - build_allow_git_fetch boolean DEFAULT true NOT NULL, - build_timeout integer DEFAULT 3600 NOT NULL, - pending_delete boolean DEFAULT false, - 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, - repository_read_only boolean, - request_access_enabled boolean DEFAULT true NOT NULL, - has_external_wiki boolean, - ci_config_path character varying, - lfs_enabled boolean, - description_html text, - only_allow_merge_if_all_discussions_are_resolved boolean, - printing_merge_request_link_enabled boolean DEFAULT true NOT NULL, - auto_cancel_pending_pipelines integer DEFAULT 1 NOT NULL, - cached_markdown_version integer, - delete_error text, - last_repository_updated_at timestamp without time zone, - storage_version smallint, - resolve_outdated_diff_discussions boolean, - external_authorization_classification_label character varying, - jobs_cache_index integer, - pages_https_only boolean DEFAULT true, - remote_mirror_available_overridden boolean, - pool_repository_id bigint, - runners_token_encrypted character varying, - bfg_object_map character varying, - detected_repository_languages boolean, - disable_overriding_approvers_per_merge_request boolean, - external_webhook_token character varying, - issues_template text, - merge_requests_author_approval boolean DEFAULT false, - merge_requests_disable_committers_approval boolean, - merge_requests_template text, - mirror_last_successful_update_at timestamp without time zone, - mirror_last_update_at timestamp without time zone, - mirror_overwrites_diverged_branches boolean, - mirror_user_id integer, - only_mirror_protected_branches boolean, - packages_enabled boolean, - pull_mirror_available_overridden boolean, - repository_size_limit bigint, - require_password_to_approve boolean, - mirror boolean DEFAULT false NOT NULL, - mirror_trigger_builds boolean DEFAULT false NOT NULL, - reset_approvals_on_push boolean DEFAULT true, - service_desk_enabled boolean DEFAULT true, - approvals_before_merge integer DEFAULT 0 NOT NULL, - emails_disabled boolean, - max_pages_size integer, - max_artifacts_size integer, - pull_mirror_branch_prefix character varying(50), - marked_for_deletion_at date, - marked_for_deletion_by_user_id integer, - remove_source_branch_after_merge boolean, - suggestion_commit_message character varying(255), - autoclose_referenced_issues boolean, - project_namespace_id bigint -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_59 + ADD CONSTRAINT product_analytics_events_experimental_59_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE projects_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_60 + ADD CONSTRAINT product_analytics_events_experimental_60_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE projects_id_seq OWNED BY projects.id; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_61 + ADD CONSTRAINT product_analytics_events_experimental_61_pkey PRIMARY KEY (id, project_id); -CREATE TABLE prometheus_alert_events ( - id bigint NOT NULL, - project_id integer NOT NULL, - prometheus_alert_id integer NOT NULL, - started_at timestamp with time zone NOT NULL, - ended_at timestamp with time zone, - status smallint, - payload_key character varying -); +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_62 + ADD CONSTRAINT product_analytics_events_experimental_62_pkey PRIMARY KEY (id, project_id); -CREATE SEQUENCE prometheus_alert_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_63 + ADD CONSTRAINT product_analytics_events_experimental_63_pkey PRIMARY KEY (id, project_id); -ALTER SEQUENCE prometheus_alert_events_id_seq OWNED BY prometheus_alert_events.id; +ALTER TABLE ONLY abuse_reports + ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); -CREATE TABLE prometheus_alerts ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - threshold double precision NOT NULL, - operator integer NOT NULL, - environment_id integer NOT NULL, - project_id integer NOT NULL, - prometheus_metric_id integer NOT NULL, - runbook_url text, - CONSTRAINT check_cb76d7e629 CHECK ((char_length(runbook_url) <= 255)) -); +ALTER TABLE ONLY agent_activity_events + ADD CONSTRAINT agent_activity_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE prometheus_alerts_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY agent_group_authorizations + ADD CONSTRAINT agent_group_authorizations_pkey PRIMARY KEY (id); -ALTER SEQUENCE prometheus_alerts_id_seq OWNED BY prometheus_alerts.id; +ALTER TABLE ONLY agent_project_authorizations + ADD CONSTRAINT agent_project_authorizations_pkey PRIMARY KEY (id); -CREATE TABLE prometheus_metrics ( - id integer NOT NULL, - project_id integer, - title character varying NOT NULL, - query character varying NOT NULL, - y_label character varying NOT NULL, - unit character varying NOT NULL, - legend character varying, - "group" integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - common boolean DEFAULT false NOT NULL, - identifier character varying, - dashboard_path text, - CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048)) -); +ALTER TABLE ONLY alert_management_alert_assignees + ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id); -CREATE SEQUENCE prometheus_metrics_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY alert_management_alert_metric_images + ADD CONSTRAINT alert_management_alert_metric_images_pkey PRIMARY KEY (id); -ALTER SEQUENCE prometheus_metrics_id_seq OWNED BY prometheus_metrics.id; +ALTER TABLE ONLY alert_management_alert_user_mentions + ADD CONSTRAINT alert_management_alert_user_mentions_pkey PRIMARY KEY (id); -CREATE TABLE protected_branch_merge_access_levels ( - id integer NOT NULL, - protected_branch_id integer NOT NULL, - access_level integer DEFAULT 40, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - group_id integer, - user_id integer -); +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT alert_management_alerts_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_branch_merge_access_levels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY alert_management_http_integrations + ADD CONSTRAINT alert_management_http_integrations_pkey PRIMARY KEY (id); + +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); + +ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams + ADD CONSTRAINT analytics_cycle_analytics_group_value_streams_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY analytics_cycle_analytics_project_stages + ADD CONSTRAINT analytics_cycle_analytics_project_stages_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams + ADD CONSTRAINT analytics_cycle_analytics_project_value_streams_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_branch_merge_access_levels_id_seq OWNED BY protected_branch_merge_access_levels.id; +ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes + ADD CONSTRAINT analytics_cycle_analytics_stage_event_hashes_pkey PRIMARY KEY (id); -CREATE TABLE protected_branch_push_access_levels ( - id integer NOT NULL, - protected_branch_id integer NOT NULL, - access_level integer DEFAULT 40, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - group_id integer, - user_id integer, - deploy_key_id integer -); +ALTER TABLE ONLY analytics_devops_adoption_segments + ADD CONSTRAINT analytics_devops_adoption_segments_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_branch_push_access_levels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY analytics_devops_adoption_snapshots + ADD CONSTRAINT analytics_devops_adoption_snapshots_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_branch_push_access_levels_id_seq OWNED BY protected_branch_push_access_levels.id; +ALTER TABLE ONLY analytics_language_trend_repository_languages + ADD CONSTRAINT analytics_language_trend_repository_languages_pkey PRIMARY KEY (programming_language_id, project_id, snapshot_date); -CREATE TABLE protected_branch_unprotect_access_levels ( - id integer NOT NULL, - protected_branch_id integer NOT NULL, - access_level integer DEFAULT 40, - user_id integer, - group_id integer -); +ALTER TABLE ONLY analytics_usage_trends_measurements + ADD CONSTRAINT analytics_usage_trends_measurements_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_branch_unprotect_access_levels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY appearances + ADD CONSTRAINT appearances_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_branch_unprotect_access_levels_id_seq OWNED BY protected_branch_unprotect_access_levels.id; +ALTER TABLE ONLY application_setting_terms + ADD CONSTRAINT application_setting_terms_pkey PRIMARY KEY (id); -CREATE TABLE protected_branches ( - id integer NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - code_owner_approval_required boolean DEFAULT false NOT NULL, - allow_force_push boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY application_settings + ADD CONSTRAINT application_settings_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_branches_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY approval_merge_request_rule_sources + ADD CONSTRAINT approval_merge_request_rule_sources_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_branches_id_seq OWNED BY protected_branches.id; +ALTER TABLE ONLY approval_merge_request_rules_approved_approvers + ADD CONSTRAINT approval_merge_request_rules_approved_approvers_pkey PRIMARY KEY (id); -CREATE TABLE protected_environment_deploy_access_levels ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - access_level integer DEFAULT 40, - protected_environment_id integer NOT NULL, - user_id integer, - group_id integer -); +ALTER TABLE ONLY approval_merge_request_rules_groups + ADD CONSTRAINT approval_merge_request_rules_groups_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_environment_deploy_access_levels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY approval_merge_request_rules + ADD CONSTRAINT approval_merge_request_rules_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_environment_deploy_access_levels_id_seq OWNED BY protected_environment_deploy_access_levels.id; +ALTER TABLE ONLY approval_merge_request_rules_users + ADD CONSTRAINT approval_merge_request_rules_users_pkey PRIMARY KEY (id); -CREATE TABLE protected_environments ( - id integer NOT NULL, - project_id integer, - created_at timestamp with time zone NOT NULL, - 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))) -); +ALTER TABLE ONLY approval_project_rules_groups + ADD CONSTRAINT approval_project_rules_groups_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_environments_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY approval_project_rules + ADD CONSTRAINT approval_project_rules_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_environments_id_seq OWNED BY protected_environments.id; +ALTER TABLE ONLY approval_project_rules_protected_branches + ADD CONSTRAINT approval_project_rules_protected_branches_pkey PRIMARY KEY (approval_project_rule_id, protected_branch_id); -CREATE TABLE protected_tag_create_access_levels ( - id integer NOT NULL, - protected_tag_id integer NOT NULL, - access_level integer DEFAULT 40, - user_id integer, - group_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY approval_project_rules_users + ADD CONSTRAINT approval_project_rules_users_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_tag_create_access_levels_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY approvals + ADD CONSTRAINT approvals_pkey PRIMARY KEY (id); -ALTER SEQUENCE protected_tag_create_access_levels_id_seq OWNED BY protected_tag_create_access_levels.id; +ALTER TABLE ONLY approver_groups + ADD CONSTRAINT approver_groups_pkey PRIMARY KEY (id); -CREATE TABLE protected_tags ( - id integer NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY approvers + ADD CONSTRAINT approvers_pkey PRIMARY KEY (id); -CREATE SEQUENCE protected_tags_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY atlassian_identities + ADD CONSTRAINT atlassian_identities_pkey PRIMARY KEY (user_id); -ALTER SEQUENCE protected_tags_id_seq OWNED BY protected_tags.id; +ALTER TABLE ONLY audit_events_external_audit_event_destinations + ADD CONSTRAINT audit_events_external_audit_event_destinations_pkey PRIMARY KEY (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, - commit_to bytea, - ref text, - commit_title character varying(70), - ref_count integer, - event_id bigint NOT NULL -); +ALTER TABLE ONLY authentication_events + ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id); -CREATE TABLE push_rules ( - id integer NOT NULL, - force_push_regex character varying, - delete_branch_regex character varying, - commit_message_regex character varying, - deny_delete_tag boolean, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - author_email_regex character varying, - member_check boolean DEFAULT false NOT NULL, - file_name_regex character varying, - is_sample boolean DEFAULT false, - max_file_size integer DEFAULT 0 NOT NULL, - prevent_secrets boolean DEFAULT false NOT NULL, - branch_name_regex character varying, - reject_unsigned_commits boolean, - commit_committer_check boolean, - regexp_uses_re2 boolean DEFAULT true, - commit_message_negative_regex character varying -); +ALTER TABLE ONLY award_emoji + ADD CONSTRAINT award_emoji_pkey PRIMARY KEY (id); -CREATE SEQUENCE push_rules_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY aws_roles + ADD CONSTRAINT aws_roles_pkey PRIMARY KEY (user_id); -ALTER SEQUENCE push_rules_id_seq OWNED BY push_rules.id; +ALTER TABLE ONLY background_migration_jobs + ADD CONSTRAINT background_migration_jobs_pkey PRIMARY KEY (id); -CREATE TABLE raw_usage_data ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - recorded_at timestamp with time zone NOT NULL, - sent_at timestamp with time zone, - payload jsonb NOT NULL, - version_usage_data_id_value bigint -); +ALTER TABLE ONLY badges + ADD CONSTRAINT badges_pkey PRIMARY KEY (id); -CREATE SEQUENCE raw_usage_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY banned_users + ADD CONSTRAINT banned_users_pkey PRIMARY KEY (user_id); -ALTER SEQUENCE raw_usage_data_id_seq OWNED BY raw_usage_data.id; +ALTER TABLE ONLY batched_background_migration_jobs + ADD CONSTRAINT batched_background_migration_jobs_pkey PRIMARY KEY (id); -CREATE TABLE redirect_routes ( - id integer NOT NULL, - source_id integer NOT NULL, - source_type character varying NOT NULL, - path character varying NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY batched_background_migrations + ADD CONSTRAINT batched_background_migrations_pkey PRIMARY KEY (id); -CREATE SEQUENCE redirect_routes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY board_assignees + ADD CONSTRAINT board_assignees_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY board_group_recent_visits + ADD CONSTRAINT board_group_recent_visits_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY board_labels + ADD CONSTRAINT board_labels_pkey PRIMARY KEY (id); -ALTER SEQUENCE redirect_routes_id_seq OWNED BY redirect_routes.id; +ALTER TABLE ONLY board_project_recent_visits + ADD CONSTRAINT board_project_recent_visits_pkey PRIMARY KEY (id); -CREATE TABLE release_links ( - id bigint NOT NULL, - release_id integer NOT NULL, - url character varying NOT NULL, - name character varying NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - filepath character varying(128), - link_type smallint DEFAULT 0 -); +ALTER TABLE ONLY board_user_preferences + ADD CONSTRAINT board_user_preferences_pkey PRIMARY KEY (id); -CREATE SEQUENCE release_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY boards_epic_board_labels + ADD CONSTRAINT boards_epic_board_labels_pkey PRIMARY KEY (id); -ALTER SEQUENCE release_links_id_seq OWNED BY release_links.id; +ALTER TABLE ONLY boards_epic_board_positions + ADD CONSTRAINT boards_epic_board_positions_pkey PRIMARY KEY (id); -CREATE TABLE releases ( - id integer NOT NULL, - tag character varying, - description text, - project_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - description_html text, - cached_markdown_version integer, - author_id integer, - name character varying, - sha character varying, - released_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY boards_epic_board_recent_visits + ADD CONSTRAINT boards_epic_board_recent_visits_pkey PRIMARY KEY (id); -CREATE SEQUENCE releases_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY boards_epic_boards + ADD CONSTRAINT boards_epic_boards_pkey PRIMARY KEY (id); -ALTER SEQUENCE releases_id_seq OWNED BY releases.id; +ALTER TABLE ONLY boards_epic_list_user_preferences + ADD CONSTRAINT boards_epic_list_user_preferences_pkey PRIMARY KEY (id); -CREATE TABLE remote_mirrors ( - id integer NOT NULL, - project_id integer, - url character varying, - enabled boolean DEFAULT false, - update_status character varying, - last_update_at timestamp without time zone, - last_successful_update_at timestamp without time zone, - last_update_started_at timestamp without time zone, - last_error character varying, - only_protected_branches boolean DEFAULT false NOT NULL, - remote_name character varying, - encrypted_credentials text, - encrypted_credentials_iv character varying, - encrypted_credentials_salt character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - error_notification_sent boolean, - keep_divergent_refs boolean -); +ALTER TABLE ONLY boards_epic_lists + ADD CONSTRAINT boards_epic_lists_pkey PRIMARY KEY (id); -CREATE SEQUENCE remote_mirrors_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY boards_epic_user_preferences + ADD CONSTRAINT boards_epic_user_preferences_pkey PRIMARY KEY (id); -ALTER SEQUENCE remote_mirrors_id_seq OWNED BY remote_mirrors.id; +ALTER TABLE ONLY boards + ADD CONSTRAINT boards_pkey PRIMARY KEY (id); -CREATE TABLE repository_languages ( - project_id integer NOT NULL, - programming_language_id integer NOT NULL, - share double precision NOT NULL -); +ALTER TABLE ONLY broadcast_messages + ADD CONSTRAINT broadcast_messages_pkey PRIMARY KEY (id); -CREATE TABLE required_code_owners_sections ( - id bigint NOT NULL, - protected_branch_id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_e58d53741e CHECK ((char_length(name) <= 1024)) -); +ALTER TABLE ONLY bulk_import_configurations + ADD CONSTRAINT bulk_import_configurations_pkey PRIMARY KEY (id); -CREATE SEQUENCE required_code_owners_sections_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT bulk_import_entities_pkey PRIMARY KEY (id); -ALTER SEQUENCE required_code_owners_sections_id_seq OWNED BY required_code_owners_sections.id; +ALTER TABLE ONLY bulk_import_export_uploads + ADD CONSTRAINT bulk_import_export_uploads_pkey PRIMARY KEY (id); -CREATE TABLE requirements ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - author_id integer, - iid integer NOT NULL, - cached_markdown_version integer, - state smallint DEFAULT 1 NOT NULL, - title character varying(255) NOT NULL, - title_html text, - description text, - description_html text, - issue_id bigint, - CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000)) -); +ALTER TABLE ONLY bulk_import_exports + ADD CONSTRAINT bulk_import_exports_pkey PRIMARY KEY (id); -CREATE SEQUENCE requirements_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY bulk_import_failures + ADD CONSTRAINT bulk_import_failures_pkey PRIMARY KEY (id); -ALTER SEQUENCE requirements_id_seq OWNED BY requirements.id; +ALTER TABLE ONLY bulk_import_trackers + ADD CONSTRAINT bulk_import_trackers_pkey PRIMARY KEY (id); -CREATE TABLE requirements_management_test_reports ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - requirement_id bigint, - author_id bigint, - state smallint NOT NULL, - build_id bigint, - issue_id bigint, - CONSTRAINT requirements_test_reports_requirement_id_xor_issue_id CHECK ((num_nonnulls(requirement_id, issue_id) = 1)) -); +ALTER TABLE ONLY bulk_imports + ADD CONSTRAINT bulk_imports_pkey PRIMARY KEY (id); -CREATE SEQUENCE requirements_management_test_reports_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY chat_names + ADD CONSTRAINT chat_names_pkey PRIMARY KEY (id); -ALTER SEQUENCE requirements_management_test_reports_id_seq OWNED BY requirements_management_test_reports.id; +ALTER TABLE ONLY chat_teams + ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id); -CREATE TABLE resource_iteration_events ( - id bigint NOT NULL, - user_id bigint NOT NULL, - issue_id bigint, - merge_request_id bigint, - iteration_id bigint, - created_at timestamp with time zone NOT NULL, - action smallint NOT NULL -); +ALTER TABLE vulnerability_scanners + ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; -CREATE SEQUENCE resource_iteration_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE sprints + ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID; -ALTER SEQUENCE resource_iteration_events_id_seq OWNED BY resource_iteration_events.id; +ALTER TABLE group_import_states + ADD CONSTRAINT check_cda75c7c3f CHECK ((user_id IS NOT NULL)) NOT VALID; -CREATE TABLE resource_label_events ( - id bigint NOT NULL, - action integer NOT NULL, - issue_id integer, - merge_request_id integer, - label_id integer, - user_id integer, - created_at timestamp with time zone NOT NULL, - cached_markdown_version integer, - reference text, - reference_html text, - epic_id integer -); +ALTER TABLE sprints + ADD CONSTRAINT check_df3816aed7 CHECK ((due_date IS NOT NULL)) NOT VALID; -CREATE SEQUENCE resource_label_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_build_needs + ADD CONSTRAINT ci_build_needs_pkey PRIMARY KEY (id); -ALTER SEQUENCE resource_label_events_id_seq OWNED BY resource_label_events.id; +ALTER TABLE ONLY ci_build_pending_states + ADD CONSTRAINT ci_build_pending_states_pkey PRIMARY KEY (id); -CREATE TABLE resource_milestone_events ( - id bigint NOT NULL, - user_id bigint, - issue_id bigint, - merge_request_id bigint, - milestone_id bigint, - action smallint NOT NULL, - state smallint NOT NULL, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY ci_build_report_results + ADD CONSTRAINT ci_build_report_results_pkey PRIMARY KEY (build_id); -CREATE SEQUENCE resource_milestone_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_build_trace_chunks + ADD CONSTRAINT ci_build_trace_chunks_pkey PRIMARY KEY (id); -ALTER SEQUENCE resource_milestone_events_id_seq OWNED BY resource_milestone_events.id; +ALTER TABLE ONLY ci_build_trace_metadata + ADD CONSTRAINT ci_build_trace_metadata_pkey PRIMARY KEY (build_id); -CREATE TABLE resource_state_events ( - id bigint NOT NULL, - user_id bigint, - issue_id bigint, - merge_request_id bigint, - created_at timestamp with time zone NOT NULL, - state smallint NOT NULL, - epic_id integer, - source_commit text, - close_after_error_tracking_resolve boolean DEFAULT false NOT NULL, - close_auto_resolve_prometheus_alert boolean DEFAULT false NOT NULL, - source_merge_request_id bigint, - CONSTRAINT check_f0bcfaa3a2 CHECK ((char_length(source_commit) <= 40)), - CONSTRAINT state_events_must_belong_to_issue_or_merge_request_or_epic CHECK ((((issue_id <> NULL::bigint) AND (merge_request_id IS NULL) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id <> NULL::bigint) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id IS NULL) AND (epic_id <> NULL::integer)))) -); +ALTER TABLE ONLY ci_builds_metadata + ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_builds + ADD CONSTRAINT ci_builds_pkey PRIMARY KEY (id); -CREATE SEQUENCE resource_state_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_builds_runner_session + ADD CONSTRAINT ci_builds_runner_session_pkey PRIMARY KEY (id); -ALTER SEQUENCE resource_state_events_id_seq OWNED BY resource_state_events.id; +ALTER TABLE ONLY ci_daily_build_group_report_results + ADD CONSTRAINT ci_daily_build_group_report_results_pkey PRIMARY KEY (id); -CREATE TABLE resource_weight_events ( - id bigint NOT NULL, - user_id bigint, - issue_id bigint NOT NULL, - weight integer, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY ci_deleted_objects + ADD CONSTRAINT ci_deleted_objects_pkey PRIMARY KEY (id); -CREATE SEQUENCE resource_weight_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_freeze_periods + ADD CONSTRAINT ci_freeze_periods_pkey PRIMARY KEY (id); -ALTER SEQUENCE resource_weight_events_id_seq OWNED BY resource_weight_events.id; +ALTER TABLE ONLY ci_group_variables + ADD CONSTRAINT ci_group_variables_pkey PRIMARY KEY (id); -CREATE TABLE reviews ( - id bigint NOT NULL, - author_id integer, - merge_request_id integer NOT NULL, - project_id integer NOT NULL, - created_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY ci_instance_variables + ADD CONSTRAINT ci_instance_variables_pkey PRIMARY KEY (id); -CREATE SEQUENCE reviews_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_job_artifact_states + ADD CONSTRAINT ci_job_artifact_states_pkey PRIMARY KEY (job_artifact_id); -ALTER SEQUENCE reviews_id_seq OWNED BY reviews.id; +ALTER TABLE ONLY ci_job_artifacts + ADD CONSTRAINT ci_job_artifacts_pkey PRIMARY KEY (id); -CREATE TABLE routes ( - id integer NOT NULL, - source_id integer NOT NULL, - source_type character varying NOT NULL, - path character varying NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - name character varying -); +ALTER TABLE ONLY ci_job_token_project_scope_links + ADD CONSTRAINT ci_job_token_project_scope_links_pkey PRIMARY KEY (id); -CREATE SEQUENCE routes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_job_variables + ADD CONSTRAINT ci_job_variables_pkey PRIMARY KEY (id); -ALTER SEQUENCE routes_id_seq OWNED BY routes.id; +ALTER TABLE ONLY ci_minutes_additional_packs + ADD CONSTRAINT ci_minutes_additional_packs_pkey PRIMARY KEY (id); -CREATE TABLE saml_group_links ( - id bigint NOT NULL, - access_level smallint NOT NULL, - group_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - saml_group_name text NOT NULL, - CONSTRAINT check_1b3fc49d1e CHECK ((char_length(saml_group_name) <= 255)) -); +ALTER TABLE ONLY ci_namespace_mirrors + ADD CONSTRAINT ci_namespace_mirrors_pkey PRIMARY KEY (id); -CREATE SEQUENCE saml_group_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_namespace_monthly_usages + ADD CONSTRAINT ci_namespace_monthly_usages_pkey PRIMARY KEY (id); -ALTER SEQUENCE saml_group_links_id_seq OWNED BY saml_group_links.id; +ALTER TABLE ONLY ci_pending_builds + ADD CONSTRAINT ci_pending_builds_pkey PRIMARY KEY (id); -CREATE TABLE saml_providers ( - id integer NOT NULL, - group_id integer NOT NULL, - enabled boolean NOT NULL, - certificate_fingerprint character varying NOT NULL, - sso_url character varying NOT NULL, - enforced_sso boolean DEFAULT false NOT NULL, - enforced_group_managed_accounts boolean DEFAULT false NOT NULL, - prohibited_outer_forks boolean DEFAULT true NOT NULL, - default_membership_role smallint DEFAULT 10 NOT NULL, - git_check_enforced boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY ci_pipeline_artifacts + ADD CONSTRAINT ci_pipeline_artifacts_pkey PRIMARY KEY (id); -CREATE SEQUENCE saml_providers_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_pipeline_chat_data + ADD CONSTRAINT ci_pipeline_chat_data_pkey PRIMARY KEY (id); -ALTER SEQUENCE saml_providers_id_seq OWNED BY saml_providers.id; +ALTER TABLE ONLY ci_pipeline_messages + ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id); -CREATE TABLE scim_identities ( - id bigint NOT NULL, - group_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, - active boolean DEFAULT false, - extern_uid character varying(255) NOT NULL -); +ALTER TABLE ONLY ci_pipeline_schedule_variables + ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id); -CREATE SEQUENCE scim_identities_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_pipeline_schedules + ADD CONSTRAINT ci_pipeline_schedules_pkey PRIMARY KEY (id); -ALTER SEQUENCE scim_identities_id_seq OWNED BY scim_identities.id; +ALTER TABLE ONLY ci_pipeline_variables + ADD CONSTRAINT ci_pipeline_variables_pkey PRIMARY KEY (id); -CREATE TABLE scim_oauth_access_tokens ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - group_id integer NOT NULL, - token_encrypted character varying NOT NULL -); +ALTER TABLE ONLY ci_pipelines_config + ADD CONSTRAINT ci_pipelines_config_pkey PRIMARY KEY (pipeline_id); -CREATE SEQUENCE scim_oauth_access_tokens_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_pipelines + ADD CONSTRAINT ci_pipelines_pkey PRIMARY KEY (id); -ALTER SEQUENCE scim_oauth_access_tokens_id_seq OWNED BY scim_oauth_access_tokens.id; +ALTER TABLE ONLY ci_platform_metrics + ADD CONSTRAINT ci_platform_metrics_pkey PRIMARY KEY (id); -CREATE TABLE security_findings ( - id bigint NOT NULL, - scan_id bigint NOT NULL, - scanner_id bigint NOT NULL, - severity smallint NOT NULL, - confidence smallint NOT NULL, - project_fingerprint text, - deduplicated boolean DEFAULT false NOT NULL, - "position" integer, - uuid uuid, - overridden_uuid uuid, - CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)) -); +ALTER TABLE ONLY ci_project_mirrors + ADD CONSTRAINT ci_project_mirrors_pkey PRIMARY KEY (id); -CREATE SEQUENCE security_findings_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_project_monthly_usages + ADD CONSTRAINT ci_project_monthly_usages_pkey PRIMARY KEY (id); -ALTER SEQUENCE security_findings_id_seq OWNED BY security_findings.id; +ALTER TABLE ONLY ci_refs + ADD CONSTRAINT ci_refs_pkey PRIMARY KEY (id); -CREATE TABLE security_orchestration_policy_configurations ( - id bigint NOT NULL, - project_id bigint NOT NULL, - 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 -); +ALTER TABLE ONLY ci_resource_groups + ADD CONSTRAINT ci_resource_groups_pkey PRIMARY KEY (id); -COMMENT ON TABLE security_orchestration_policy_configurations IS '{"owner":"group::container security","description":"Configuration used to store relationship between project and security policy repository"}'; +ALTER TABLE ONLY ci_resources + ADD CONSTRAINT ci_resources_pkey PRIMARY KEY (id); -CREATE SEQUENCE security_orchestration_policy_configurations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_runner_namespaces + ADD CONSTRAINT ci_runner_namespaces_pkey PRIMARY KEY (id); -ALTER SEQUENCE security_orchestration_policy_configurations_id_seq OWNED BY security_orchestration_policy_configurations.id; +ALTER TABLE ONLY ci_runner_projects + ADD CONSTRAINT ci_runner_projects_pkey PRIMARY KEY (id); -CREATE TABLE security_orchestration_policy_rule_schedules ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - next_run_at timestamp with time zone, - security_orchestration_policy_configuration_id bigint NOT NULL, - user_id bigint NOT NULL, - policy_index integer NOT NULL, - cron text NOT NULL, - rule_index integer DEFAULT 0 NOT NULL, - CONSTRAINT check_915825a76e CHECK ((char_length(cron) <= 255)) -); +ALTER TABLE ONLY ci_runners + ADD CONSTRAINT ci_runners_pkey PRIMARY KEY (id); -COMMENT ON TABLE security_orchestration_policy_rule_schedules IS '{"owner":"group::container security","description":"Schedules used to store relationship between project and security policy repository"}'; +ALTER TABLE ONLY ci_running_builds + ADD CONSTRAINT ci_running_builds_pkey PRIMARY KEY (id); -CREATE SEQUENCE security_orchestration_policy_rule_schedules_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_secure_files + ADD CONSTRAINT ci_secure_files_pkey PRIMARY KEY (id); -ALTER SEQUENCE security_orchestration_policy_rule_schedules_id_seq OWNED BY security_orchestration_policy_rule_schedules.id; +ALTER TABLE ONLY ci_sources_pipelines + ADD CONSTRAINT ci_sources_pipelines_pkey PRIMARY KEY (id); -CREATE TABLE security_scans ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - build_id bigint NOT NULL, - scan_type smallint NOT NULL, - info jsonb DEFAULT '{}'::jsonb NOT NULL, - project_id bigint, - pipeline_id bigint -); +ALTER TABLE ONLY ci_sources_projects + ADD CONSTRAINT ci_sources_projects_pkey PRIMARY KEY (id); -CREATE SEQUENCE security_scans_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_stages + ADD CONSTRAINT ci_stages_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_subscriptions_projects + ADD CONSTRAINT ci_subscriptions_projects_pkey PRIMARY KEY (id); -ALTER SEQUENCE security_scans_id_seq OWNED BY security_scans.id; +ALTER TABLE ONLY ci_trigger_requests + ADD CONSTRAINT ci_trigger_requests_pkey PRIMARY KEY (id); -CREATE TABLE self_managed_prometheus_alert_events ( - id bigint NOT NULL, - project_id bigint NOT NULL, - environment_id bigint, - started_at timestamp with time zone NOT NULL, - ended_at timestamp with time zone, - status smallint NOT NULL, - title character varying(255) NOT NULL, - query_expression character varying(255), - payload_key character varying(255) NOT NULL -); +ALTER TABLE ONLY ci_triggers + ADD CONSTRAINT ci_triggers_pkey PRIMARY KEY (id); -CREATE SEQUENCE self_managed_prometheus_alert_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ci_unit_test_failures + ADD CONSTRAINT ci_unit_test_failures_pkey PRIMARY KEY (id); -ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed_prometheus_alert_events.id; +ALTER TABLE ONLY ci_unit_tests + ADD CONSTRAINT ci_unit_tests_pkey PRIMARY KEY (id); -CREATE TABLE sent_notifications ( - id integer NOT NULL, - project_id integer, - noteable_type character varying, - noteable_id integer, - recipient_id integer, - commit_id character varying, - reply_key character varying NOT NULL, - line_code character varying, - note_type character varying, - "position" text, - in_reply_to_discussion_id character varying -); +ALTER TABLE ONLY ci_variables + ADD CONSTRAINT ci_variables_pkey PRIMARY KEY (id); -CREATE SEQUENCE sent_notifications_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY cluster_agent_tokens + ADD CONSTRAINT cluster_agent_tokens_pkey PRIMARY KEY (id); -ALTER SEQUENCE sent_notifications_id_seq OWNED BY sent_notifications.id; +ALTER TABLE ONLY cluster_agents + ADD CONSTRAINT cluster_agents_pkey PRIMARY KEY (id); -CREATE TABLE sentry_issues ( - id bigint NOT NULL, - issue_id bigint NOT NULL, - sentry_issue_identifier bigint NOT NULL -); +ALTER TABLE ONLY cluster_groups + ADD CONSTRAINT cluster_groups_pkey PRIMARY KEY (id); -CREATE SEQUENCE sentry_issues_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY cluster_platforms_kubernetes + ADD CONSTRAINT cluster_platforms_kubernetes_pkey PRIMARY KEY (id); -ALTER SEQUENCE sentry_issues_id_seq OWNED BY sentry_issues.id; +ALTER TABLE ONLY cluster_projects + ADD CONSTRAINT cluster_projects_pkey PRIMARY KEY (id); -CREATE TABLE serverless_domain_cluster ( - pages_domain_id bigint NOT NULL, - clusters_applications_knative_id bigint NOT NULL, - creator_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - uuid character varying(14) NOT NULL, - encrypted_key text, - encrypted_key_iv character varying(255), - certificate text -); +ALTER TABLE ONLY cluster_providers_aws + ADD CONSTRAINT cluster_providers_aws_pkey PRIMARY KEY (id); -CREATE TABLE service_desk_settings ( - project_id bigint NOT NULL, - issue_template_key character varying(255), - outgoing_name character varying(255), - project_key character varying(255), - file_template_project_id bigint -); +ALTER TABLE ONLY cluster_providers_gcp + ADD CONSTRAINT cluster_providers_gcp_pkey PRIMARY KEY (id); -CREATE TABLE shards ( - id integer NOT NULL, - name character varying NOT NULL -); +ALTER TABLE ONLY clusters_applications_cert_managers + ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id); -CREATE SEQUENCE shards_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_applications_cilium + ADD CONSTRAINT clusters_applications_cilium_pkey PRIMARY KEY (id); -ALTER SEQUENCE shards_id_seq OWNED BY shards.id; +ALTER TABLE ONLY clusters_applications_crossplane + ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id); -CREATE TABLE slack_integrations ( - id integer NOT NULL, - service_id integer NOT NULL, - team_id character varying NOT NULL, - team_name character varying NOT NULL, - alias character varying NOT NULL, - user_id character varying NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY clusters_applications_elastic_stacks + ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id); -CREATE SEQUENCE slack_integrations_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_applications_helm + ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id); -ALTER SEQUENCE slack_integrations_id_seq OWNED BY slack_integrations.id; +ALTER TABLE ONLY clusters_applications_ingress + ADD CONSTRAINT clusters_applications_ingress_pkey PRIMARY KEY (id); -CREATE TABLE smartcard_identities ( - id bigint NOT NULL, - user_id integer NOT NULL, - subject character varying NOT NULL, - issuer character varying NOT NULL -); +ALTER TABLE ONLY clusters_applications_jupyter + ADD CONSTRAINT clusters_applications_jupyter_pkey PRIMARY KEY (id); -CREATE SEQUENCE smartcard_identities_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_applications_knative + ADD CONSTRAINT clusters_applications_knative_pkey PRIMARY KEY (id); -ALTER SEQUENCE smartcard_identities_id_seq OWNED BY smartcard_identities.id; +ALTER TABLE ONLY clusters_applications_prometheus + ADD CONSTRAINT clusters_applications_prometheus_pkey PRIMARY KEY (id); -CREATE TABLE snippet_repositories ( - shard_id bigint NOT NULL, - snippet_id bigint NOT NULL, - disk_path character varying(80) NOT NULL, - verification_retry_count smallint, - verification_retry_at timestamp with time zone, - verified_at timestamp with time zone, - verification_checksum bytea, - verification_failure text, - verification_state smallint DEFAULT 0 NOT NULL, - verification_started_at timestamp with time zone, - CONSTRAINT snippet_repositories_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) -); +ALTER TABLE ONLY clusters_applications_runners + ADD CONSTRAINT clusters_applications_runners_pkey PRIMARY KEY (id); -CREATE TABLE snippet_repository_storage_moves ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - snippet_id bigint NOT NULL, - state smallint DEFAULT 1 NOT NULL, - source_storage_name text NOT NULL, - destination_storage_name text NOT NULL, - CONSTRAINT snippet_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), - CONSTRAINT snippet_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) -); +ALTER TABLE ONLY clusters_integration_elasticstack + ADD CONSTRAINT clusters_integration_elasticstack_pkey PRIMARY KEY (cluster_id); -CREATE SEQUENCE snippet_repository_storage_moves_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY clusters_integration_prometheus + ADD CONSTRAINT clusters_integration_prometheus_pkey PRIMARY KEY (cluster_id); -ALTER SEQUENCE snippet_repository_storage_moves_id_seq OWNED BY snippet_repository_storage_moves.id; +ALTER TABLE ONLY clusters_kubernetes_namespaces + ADD CONSTRAINT clusters_kubernetes_namespaces_pkey PRIMARY KEY (id); -CREATE TABLE snippet_statistics ( - snippet_id bigint NOT NULL, - repository_size bigint DEFAULT 0 NOT NULL, - file_count bigint DEFAULT 0 NOT NULL, - commit_count bigint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY clusters + ADD CONSTRAINT clusters_pkey PRIMARY KEY (id); -CREATE TABLE snippet_user_mentions ( - id bigint NOT NULL, - snippet_id integer NOT NULL, - note_id integer, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] -); +ALTER TABLE ONLY commit_user_mentions + ADD CONSTRAINT commit_user_mentions_pkey PRIMARY KEY (id); -CREATE SEQUENCE snippet_user_mentions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY compliance_management_frameworks + ADD CONSTRAINT compliance_management_frameworks_pkey PRIMARY KEY (id); -ALTER SEQUENCE snippet_user_mentions_id_seq OWNED BY snippet_user_mentions.id; +ALTER TABLE ONLY container_expiration_policies + ADD CONSTRAINT container_expiration_policies_pkey PRIMARY KEY (project_id); -CREATE TABLE snippets ( - id integer NOT NULL, - title character varying, - content text, - author_id integer NOT NULL, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - file_name character varying, - type character varying, - visibility_level integer DEFAULT 0 NOT NULL, - title_html text, - content_html text, - cached_markdown_version integer, - description text, - description_html text, - encrypted_secret_token character varying(255), - encrypted_secret_token_iv character varying(255), - secret boolean DEFAULT false NOT NULL, - repository_read_only boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY container_repositories + ADD CONSTRAINT container_repositories_pkey PRIMARY KEY (id); -CREATE SEQUENCE snippets_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY content_blocked_states + ADD CONSTRAINT content_blocked_states_pkey PRIMARY KEY (id); -ALTER SEQUENCE snippets_id_seq OWNED BY snippets.id; +ALTER TABLE ONLY conversational_development_index_metrics + ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id); -CREATE TABLE software_license_policies ( - id integer NOT NULL, - project_id integer NOT NULL, - software_license_id integer NOT NULL, - classification integer DEFAULT 0, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_8e8751b568 CHECK ((classification IS NOT NULL)) -); +ALTER TABLE ONLY coverage_fuzzing_corpuses + ADD CONSTRAINT coverage_fuzzing_corpuses_pkey PRIMARY KEY (id); -CREATE SEQUENCE software_license_policies_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY csv_issue_imports + ADD CONSTRAINT csv_issue_imports_pkey PRIMARY KEY (id); -ALTER SEQUENCE software_license_policies_id_seq OWNED BY software_license_policies.id; +ALTER TABLE ONLY custom_emoji + ADD CONSTRAINT custom_emoji_pkey PRIMARY KEY (id); -CREATE TABLE software_licenses ( - id integer NOT NULL, - name character varying NOT NULL, - spdx_identifier character varying(255) -); +ALTER TABLE ONLY customer_relations_contacts + ADD CONSTRAINT customer_relations_contacts_pkey PRIMARY KEY (id); -CREATE SEQUENCE software_licenses_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY customer_relations_organizations + ADD CONSTRAINT customer_relations_organizations_pkey PRIMARY KEY (id); -ALTER SEQUENCE software_licenses_id_seq OWNED BY software_licenses.id; +ALTER TABLE ONLY dast_profile_schedules + ADD CONSTRAINT dast_profile_schedules_pkey PRIMARY KEY (id); -CREATE TABLE spam_logs ( - id integer NOT NULL, - user_id integer, - source_ip character varying, - user_agent character varying, - via_api boolean, - noteable_type character varying, - title character varying, - description text, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - submitted_as_ham boolean DEFAULT false NOT NULL, - recaptcha_verified boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY dast_profiles_pipelines + ADD CONSTRAINT dast_profiles_pipelines_pkey PRIMARY KEY (dast_profile_id, ci_pipeline_id); -CREATE SEQUENCE spam_logs_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_profiles + ADD CONSTRAINT dast_profiles_pkey PRIMARY KEY (id); -ALTER SEQUENCE spam_logs_id_seq OWNED BY spam_logs.id; +ALTER TABLE ONLY dast_scanner_profiles_builds + ADD CONSTRAINT dast_scanner_profiles_builds_pkey PRIMARY KEY (dast_scanner_profile_id, ci_build_id); -CREATE TABLE sprints ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - start_date date, - due_date date, - project_id bigint, - group_id bigint, - iid integer NOT NULL, - cached_markdown_version integer, - title text NOT NULL, - title_html text, - description text, - description_html text, - state_enum smallint DEFAULT 1 NOT NULL, - iterations_cadence_id 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)) -); +ALTER TABLE ONLY dast_scanner_profiles + ADD CONSTRAINT dast_scanner_profiles_pkey PRIMARY KEY (id); -CREATE SEQUENCE sprints_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_site_profile_secret_variables + ADD CONSTRAINT dast_site_profile_secret_variables_pkey PRIMARY KEY (id); -ALTER SEQUENCE sprints_id_seq OWNED BY sprints.id; +ALTER TABLE ONLY dast_site_profiles_builds + ADD CONSTRAINT dast_site_profiles_builds_pkey PRIMARY KEY (dast_site_profile_id, ci_build_id); -CREATE TABLE status_check_responses ( - id bigint NOT NULL, - merge_request_id bigint NOT NULL, - external_approval_rule_id bigint, - sha bytea NOT NULL, - external_status_check_id bigint NOT NULL -); +ALTER TABLE ONLY dast_site_profiles_pipelines + ADD CONSTRAINT dast_site_profiles_pipelines_pkey PRIMARY KEY (dast_site_profile_id, ci_pipeline_id); -CREATE SEQUENCE status_check_responses_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_site_profiles + ADD CONSTRAINT dast_site_profiles_pkey PRIMARY KEY (id); -ALTER SEQUENCE status_check_responses_id_seq OWNED BY status_check_responses.id; +ALTER TABLE ONLY dast_site_tokens + ADD CONSTRAINT dast_site_tokens_pkey PRIMARY KEY (id); -CREATE TABLE status_page_published_incidents ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - issue_id bigint NOT NULL -); +ALTER TABLE ONLY dast_site_validations + ADD CONSTRAINT dast_site_validations_pkey PRIMARY KEY (id); -CREATE SEQUENCE status_page_published_incidents_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dast_sites + ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); -ALTER SEQUENCE status_page_published_incidents_id_seq OWNED BY status_page_published_incidents.id; +ALTER TABLE ONLY dependency_proxy_blobs + ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); -CREATE TABLE status_page_settings ( - project_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, - aws_s3_bucket_name character varying(63) NOT NULL, - aws_region character varying(255) NOT NULL, - aws_access_key character varying(255) NOT NULL, - encrypted_aws_secret_key character varying(255) NOT NULL, - encrypted_aws_secret_key_iv character varying(255) NOT NULL, - status_page_url text, - CONSTRAINT check_75a79cd992 CHECK ((char_length(status_page_url) <= 1024)) -); +ALTER TABLE ONLY dependency_proxy_group_settings + ADD CONSTRAINT dependency_proxy_group_settings_pkey PRIMARY KEY (id); -CREATE SEQUENCE status_page_settings_project_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dependency_proxy_image_ttl_group_policies + ADD CONSTRAINT dependency_proxy_image_ttl_group_policies_pkey PRIMARY KEY (group_id); -ALTER SEQUENCE status_page_settings_project_id_seq OWNED BY status_page_settings.project_id; +ALTER TABLE ONLY dependency_proxy_manifests + ADD CONSTRAINT dependency_proxy_manifests_pkey PRIMARY KEY (id); -CREATE TABLE subscriptions ( - id integer NOT NULL, - user_id integer, - subscribable_type character varying, - subscribable_id integer, - subscribed boolean, - created_at timestamp without time zone, - updated_at timestamp without time zone, - project_id integer -); +ALTER TABLE ONLY deploy_keys_projects + ADD CONSTRAINT deploy_keys_projects_pkey PRIMARY KEY (id); -CREATE SEQUENCE subscriptions_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY deploy_tokens + ADD CONSTRAINT deploy_tokens_pkey PRIMARY KEY (id); -ALTER SEQUENCE subscriptions_id_seq OWNED BY subscriptions.id; +ALTER TABLE ONLY deployment_approvals + ADD CONSTRAINT deployment_approvals_pkey PRIMARY KEY (id); -CREATE TABLE suggestions ( - id bigint NOT NULL, - note_id integer NOT NULL, - relative_order smallint NOT NULL, - applied boolean DEFAULT false NOT NULL, - commit_id character varying, - from_content text NOT NULL, - to_content text NOT NULL, - lines_above integer DEFAULT 0 NOT NULL, - lines_below integer DEFAULT 0 NOT NULL, - outdated boolean DEFAULT false NOT NULL -); +ALTER TABLE ONLY deployment_clusters + ADD CONSTRAINT deployment_clusters_pkey PRIMARY KEY (deployment_id); -CREATE SEQUENCE suggestions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY deployment_merge_requests + ADD CONSTRAINT deployment_merge_requests_pkey PRIMARY KEY (deployment_id, merge_request_id); -ALTER SEQUENCE suggestions_id_seq OWNED BY suggestions.id; +ALTER TABLE ONLY deployments + ADD CONSTRAINT deployments_pkey PRIMARY KEY (id); -CREATE TABLE system_note_metadata ( - id integer NOT NULL, - note_id integer NOT NULL, - commit_count integer, - action character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - description_version_id bigint -); +ALTER TABLE ONLY description_versions + ADD CONSTRAINT description_versions_pkey PRIMARY KEY (id); -CREATE SEQUENCE system_note_metadata_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY design_management_designs + ADD CONSTRAINT design_management_designs_pkey PRIMARY KEY (id); -ALTER SEQUENCE system_note_metadata_id_seq OWNED BY system_note_metadata.id; +ALTER TABLE ONLY design_management_designs_versions + ADD CONSTRAINT design_management_designs_versions_pkey PRIMARY KEY (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, - context character varying, - created_at timestamp without time zone, - id bigint NOT NULL, - taggable_id bigint -); +ALTER TABLE ONLY design_management_versions + ADD CONSTRAINT design_management_versions_pkey PRIMARY KEY (id); -CREATE SEQUENCE taggings_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY design_user_mentions + ADD CONSTRAINT design_user_mentions_pkey PRIMARY KEY (id); -ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id; +ALTER TABLE ONLY detached_partitions + ADD CONSTRAINT detached_partitions_pkey PRIMARY KEY (id); -CREATE TABLE tags ( - id integer NOT NULL, - name character varying, - taggings_count integer DEFAULT 0 -); +ALTER TABLE ONLY diff_note_positions + ADD CONSTRAINT diff_note_positions_pkey PRIMARY KEY (id); -CREATE SEQUENCE tags_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY dora_daily_metrics + ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id); -ALTER SEQUENCE tags_id_seq OWNED BY tags.id; +ALTER TABLE ONLY draft_notes + ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id); -CREATE TABLE term_agreements ( - id integer NOT NULL, - term_id integer NOT NULL, - user_id integer NOT NULL, - accepted boolean DEFAULT false NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY elastic_index_settings + ADD CONSTRAINT elastic_index_settings_pkey PRIMARY KEY (id); -CREATE SEQUENCE term_agreements_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY elastic_reindexing_slices + ADD CONSTRAINT elastic_reindexing_slices_pkey PRIMARY KEY (id); -ALTER SEQUENCE term_agreements_id_seq OWNED BY term_agreements.id; +ALTER TABLE ONLY elastic_reindexing_subtasks + ADD CONSTRAINT elastic_reindexing_subtasks_pkey PRIMARY KEY (id); -CREATE TABLE terraform_state_versions ( - id bigint NOT NULL, - terraform_state_id bigint NOT NULL, - created_by_user_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - version integer NOT NULL, - file_store smallint NOT NULL, - file text NOT NULL, - verification_retry_count smallint, - verification_retry_at timestamp with time zone, - verified_at timestamp with time zone, - verification_checksum bytea, - verification_failure text, - ci_build_id bigint, - verification_started_at timestamp with time zone, - verification_state smallint DEFAULT 0 NOT NULL, - CONSTRAINT check_0824bb7bbd CHECK ((char_length(file) <= 255)), - CONSTRAINT tf_state_versions_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) -); +ALTER TABLE ONLY elastic_reindexing_tasks + ADD CONSTRAINT elastic_reindexing_tasks_pkey PRIMARY KEY (id); -CREATE SEQUENCE terraform_state_versions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY elasticsearch_indexed_namespaces + ADD CONSTRAINT elasticsearch_indexed_namespaces_pkey PRIMARY KEY (namespace_id); -ALTER SEQUENCE terraform_state_versions_id_seq OWNED BY terraform_state_versions.id; +ALTER TABLE ONLY elasticsearch_indexed_projects + ADD CONSTRAINT elasticsearch_indexed_projects_pkey PRIMARY KEY (project_id); -CREATE TABLE terraform_states ( - 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, - file character varying(255), - lock_xid character varying(255), - locked_at timestamp with time zone, - locked_by_user_id bigint, - uuid character varying(32) NOT NULL, - name character varying(255) NOT NULL, - versioning_enabled boolean DEFAULT true NOT NULL -); +ALTER TABLE ONLY emails + ADD CONSTRAINT emails_pkey PRIMARY KEY (id); -CREATE SEQUENCE terraform_states_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY environments + ADD CONSTRAINT environments_pkey PRIMARY KEY (id); -ALTER SEQUENCE terraform_states_id_seq OWNED BY terraform_states.id; +ALTER TABLE ONLY epic_issues + ADD CONSTRAINT epic_issues_pkey PRIMARY KEY (id); -CREATE TABLE timelogs ( - id integer NOT NULL, - time_spent integer NOT NULL, - user_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - issue_id integer, - merge_request_id integer, - spent_at timestamp with time zone, - note_id integer, - project_id integer, - summary text, - CONSTRAINT check_271d321699 CHECK ((char_length(summary) <= 255)) -); +ALTER TABLE ONLY epic_metrics + ADD CONSTRAINT epic_metrics_pkey PRIMARY KEY (id); -CREATE SEQUENCE timelogs_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY epic_user_mentions + ADD CONSTRAINT epic_user_mentions_pkey PRIMARY KEY (id); -ALTER SEQUENCE timelogs_id_seq OWNED BY timelogs.id; +ALTER TABLE ONLY epics + ADD CONSTRAINT epics_pkey PRIMARY KEY (id); -CREATE TABLE todos ( - id integer NOT NULL, - user_id integer NOT NULL, - project_id integer, - target_type character varying NOT NULL, - target_id integer, - author_id integer NOT NULL, - action integer NOT NULL, - state character varying NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone, - note_id integer, - commit_id character varying, - group_id integer, - resolved_by_action smallint -); +ALTER TABLE ONLY error_tracking_client_keys + ADD CONSTRAINT error_tracking_client_keys_pkey PRIMARY KEY (id); -CREATE SEQUENCE todos_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY error_tracking_error_events + ADD CONSTRAINT error_tracking_error_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE todos_id_seq OWNED BY todos.id; +ALTER TABLE ONLY error_tracking_errors + ADD CONSTRAINT error_tracking_errors_pkey PRIMARY KEY (id); -CREATE TABLE token_with_ivs ( - id bigint NOT NULL, - hashed_token bytea NOT NULL, - hashed_plaintext_token bytea NOT NULL, - iv bytea NOT NULL -); +ALTER TABLE ONLY events + ADD CONSTRAINT events_pkey PRIMARY KEY (id); -CREATE SEQUENCE token_with_ivs_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY evidences + ADD CONSTRAINT evidences_pkey PRIMARY KEY (id); -ALTER SEQUENCE token_with_ivs_id_seq OWNED BY token_with_ivs.id; +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id); -CREATE TABLE topics ( - id bigint NOT NULL, - name text NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_7a90d4c757 CHECK ((char_length(name) <= 255)) -); +ALTER TABLE ONLY experiment_users + ADD CONSTRAINT experiment_users_pkey PRIMARY KEY (id); -CREATE SEQUENCE topics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY experiments + ADD CONSTRAINT experiments_pkey PRIMARY KEY (id); -ALTER SEQUENCE topics_id_seq OWNED BY topics.id; +ALTER TABLE ONLY external_approval_rules + ADD CONSTRAINT external_approval_rules_pkey PRIMARY KEY (id); -CREATE TABLE trending_projects ( - id integer NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY external_approval_rules_protected_branches + ADD CONSTRAINT external_approval_rules_protected_branches_pkey PRIMARY KEY (id); -CREATE SEQUENCE trending_projects_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY external_pull_requests + ADD CONSTRAINT external_pull_requests_pkey PRIMARY KEY (id); -ALTER SEQUENCE trending_projects_id_seq OWNED BY trending_projects.id; +ALTER TABLE ONLY external_status_checks + ADD CONSTRAINT external_status_checks_pkey PRIMARY KEY (id); -CREATE TABLE u2f_registrations ( - id integer NOT NULL, - certificate text, - key_handle character varying, - public_key character varying, - counter integer, - user_id integer, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - name character varying -); +ALTER TABLE ONLY external_status_checks_protected_branches + ADD CONSTRAINT external_status_checks_protected_branches_pkey PRIMARY KEY (id); -CREATE SEQUENCE u2f_registrations_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY feature_gates + ADD CONSTRAINT feature_gates_pkey PRIMARY KEY (id); -ALTER SEQUENCE u2f_registrations_id_seq OWNED BY u2f_registrations.id; +ALTER TABLE ONLY features + ADD CONSTRAINT features_pkey PRIMARY KEY (id); -CREATE TABLE upcoming_reconciliations ( - id bigint NOT NULL, - namespace_id bigint, - next_reconciliation_date date NOT NULL, - display_alert_from date NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY fork_network_members + ADD CONSTRAINT fork_network_members_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY fork_networks + ADD CONSTRAINT fork_networks_pkey PRIMARY KEY (id); -CREATE SEQUENCE upcoming_reconciliations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_cache_invalidation_events + ADD CONSTRAINT geo_cache_invalidation_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE upcoming_reconciliations_id_seq OWNED BY upcoming_reconciliations.id; +ALTER TABLE ONLY geo_container_repository_updated_events + ADD CONSTRAINT geo_container_repository_updated_events_pkey PRIMARY KEY (id); -CREATE TABLE uploads ( - id integer NOT NULL, - size bigint NOT NULL, - path character varying(511) NOT NULL, - checksum character varying(64), - model_type character varying, - model_id integer, - uploader character varying NOT NULL, - created_at timestamp without time zone NOT NULL, - store integer DEFAULT 1, - mount_point character varying, - secret character varying, - CONSTRAINT check_5e9547379c CHECK ((store IS NOT NULL)) -); +ALTER TABLE ONLY geo_event_log + ADD CONSTRAINT geo_event_log_pkey PRIMARY KEY (id); -CREATE SEQUENCE uploads_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_events + ADD CONSTRAINT geo_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE uploads_id_seq OWNED BY uploads.id; +ALTER TABLE ONLY geo_hashed_storage_attachments_events + ADD CONSTRAINT geo_hashed_storage_attachments_events_pkey PRIMARY KEY (id); -CREATE TABLE user_agent_details ( - id integer NOT NULL, - user_agent character varying NOT NULL, - ip_address character varying NOT NULL, - subject_id integer NOT NULL, - subject_type character varying NOT NULL, - submitted boolean DEFAULT false NOT NULL, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL -); +ALTER TABLE ONLY geo_hashed_storage_migrated_events + ADD CONSTRAINT geo_hashed_storage_migrated_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_agent_details_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_job_artifact_deleted_events + ADD CONSTRAINT geo_job_artifact_deleted_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_agent_details_id_seq OWNED BY user_agent_details.id; +ALTER TABLE ONLY geo_lfs_object_deleted_events + ADD CONSTRAINT geo_lfs_object_deleted_events_pkey PRIMARY KEY (id); -CREATE TABLE user_callouts ( - id integer NOT NULL, - feature_name integer NOT NULL, - user_id integer NOT NULL, - dismissed_at timestamp with time zone -); +ALTER TABLE ONLY geo_node_namespace_links + ADD CONSTRAINT geo_node_namespace_links_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_callouts_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_node_statuses + ADD CONSTRAINT geo_node_statuses_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_callouts_id_seq OWNED BY user_callouts.id; +ALTER TABLE ONLY geo_nodes + ADD CONSTRAINT geo_nodes_pkey PRIMARY KEY (id); -CREATE TABLE user_canonical_emails ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id bigint NOT NULL, - canonical_email character varying NOT NULL -); +ALTER TABLE ONLY geo_repositories_changed_events + ADD CONSTRAINT geo_repositories_changed_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_canonical_emails_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_repository_created_events + ADD CONSTRAINT geo_repository_created_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_canonical_emails_id_seq OWNED BY user_canonical_emails.id; +ALTER TABLE ONLY geo_repository_deleted_events + ADD CONSTRAINT geo_repository_deleted_events_pkey PRIMARY KEY (id); -CREATE TABLE user_credit_card_validations ( - user_id bigint NOT NULL, - credit_card_validated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY geo_repository_renamed_events + ADD CONSTRAINT geo_repository_renamed_events_pkey PRIMARY KEY (id); -CREATE TABLE user_custom_attributes ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id integer NOT NULL, - key character varying NOT NULL, - value character varying NOT NULL -); +ALTER TABLE ONLY geo_repository_updated_events + ADD CONSTRAINT geo_repository_updated_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_custom_attributes_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY geo_reset_checksum_events + ADD CONSTRAINT geo_reset_checksum_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_custom_attributes_id_seq OWNED BY user_custom_attributes.id; +ALTER TABLE ONLY gitlab_subscription_histories + ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id); -CREATE TABLE user_details ( - user_id bigint NOT NULL, - 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, - CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)), - 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)) -); +ALTER TABLE ONLY gitlab_subscriptions + ADD CONSTRAINT gitlab_subscriptions_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_details_user_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY gpg_key_subkeys + ADD CONSTRAINT gpg_key_subkeys_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_details_user_id_seq OWNED BY user_details.user_id; +ALTER TABLE ONLY gpg_keys + ADD CONSTRAINT gpg_keys_pkey PRIMARY KEY (id); -CREATE TABLE user_follow_users ( - follower_id integer NOT NULL, - followee_id integer NOT NULL -); +ALTER TABLE ONLY gpg_signatures + ADD CONSTRAINT gpg_signatures_pkey PRIMARY KEY (id); -CREATE TABLE user_group_callouts ( - id bigint NOT NULL, - user_id bigint NOT NULL, - group_id bigint NOT NULL, - feature_name smallint NOT NULL, - dismissed_at timestamp with time zone -); +ALTER TABLE ONLY grafana_integrations + ADD CONSTRAINT grafana_integrations_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_group_callouts_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY group_crm_settings + ADD CONSTRAINT group_crm_settings_pkey PRIMARY KEY (group_id); -ALTER SEQUENCE user_group_callouts_id_seq OWNED BY user_group_callouts.id; +ALTER TABLE ONLY group_custom_attributes + ADD CONSTRAINT group_custom_attributes_pkey PRIMARY KEY (id); -CREATE TABLE user_highest_roles ( - updated_at timestamp with time zone NOT NULL, - user_id bigint NOT NULL, - highest_access_level integer -); +ALTER TABLE ONLY group_deletion_schedules + ADD CONSTRAINT group_deletion_schedules_pkey PRIMARY KEY (group_id); -CREATE TABLE user_interacted_projects ( - user_id integer NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY group_deploy_keys_groups + ADD CONSTRAINT group_deploy_keys_groups_pkey PRIMARY KEY (id); -CREATE TABLE user_permission_export_uploads ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id bigint NOT NULL, - file_store integer, - status smallint DEFAULT 0 NOT NULL, - file text, - CONSTRAINT check_1956806648 CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY group_deploy_keys + ADD CONSTRAINT group_deploy_keys_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_permission_export_uploads_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY group_deploy_tokens + ADD CONSTRAINT group_deploy_tokens_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_permission_export_uploads_id_seq OWNED BY user_permission_export_uploads.id; +ALTER TABLE ONLY group_features + ADD CONSTRAINT group_features_pkey PRIMARY KEY (group_id); -CREATE TABLE user_preferences ( - id integer NOT NULL, - user_id integer NOT NULL, - issue_notes_filter smallint DEFAULT 0 NOT NULL, - merge_request_notes_filter smallint DEFAULT 0 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - first_day_of_week integer, - issues_sort character varying, - merge_requests_sort character varying, - timezone character varying, - time_display_relative boolean, - time_format_in_24h boolean, - epic_notes_filter smallint DEFAULT 0 NOT NULL, - epics_sort character varying, - roadmap_epics_state integer, - roadmaps_sort character varying, - projects_sort character varying(64), - show_whitespace_in_diffs boolean DEFAULT true NOT NULL, - setup_for_company boolean, - sourcegraph_enabled boolean, - render_whitespace_in_code boolean, - tab_width smallint, - experience_level smallint, - view_diffs_file_by_file boolean DEFAULT false NOT NULL, - gitpod_enabled boolean DEFAULT false NOT NULL, - markdown_surround_selection boolean DEFAULT true NOT NULL -); +ALTER TABLE ONLY group_group_links + ADD CONSTRAINT group_group_links_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_preferences_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY group_import_states + ADD CONSTRAINT group_import_states_pkey PRIMARY KEY (group_id); + +ALTER TABLE ONLY group_merge_request_approval_settings + ADD CONSTRAINT group_merge_request_approval_settings_pkey PRIMARY KEY (group_id); -ALTER SEQUENCE user_preferences_id_seq OWNED BY user_preferences.id; +ALTER TABLE ONLY group_repository_storage_moves + ADD CONSTRAINT group_repository_storage_moves_pkey PRIMARY KEY (id); -CREATE TABLE user_statuses ( - user_id integer NOT NULL, - cached_markdown_version integer, - emoji character varying DEFAULT 'speech_balloon'::character varying NOT NULL, - message character varying(100), - message_html character varying, - availability smallint DEFAULT 0 NOT NULL, - clear_status_at timestamp with time zone -); +ALTER TABLE ONLY group_wiki_repositories + ADD CONSTRAINT group_wiki_repositories_pkey PRIMARY KEY (group_id); -CREATE SEQUENCE user_statuses_user_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY historical_data + ADD CONSTRAINT historical_data_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_statuses_user_id_seq OWNED BY user_statuses.user_id; +ALTER TABLE ONLY identities + ADD CONSTRAINT identities_pkey PRIMARY KEY (id); -CREATE TABLE user_synced_attributes_metadata ( - id integer NOT NULL, - name_synced boolean DEFAULT false, - email_synced boolean DEFAULT false, - location_synced boolean DEFAULT false, - user_id integer NOT NULL, - provider character varying -); +ALTER TABLE ONLY import_export_uploads + ADD CONSTRAINT import_export_uploads_pkey PRIMARY KEY (id); -CREATE SEQUENCE user_synced_attributes_metadata_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY import_failures + ADD CONSTRAINT import_failures_pkey PRIMARY KEY (id); -ALTER SEQUENCE user_synced_attributes_metadata_id_seq OWNED BY user_synced_attributes_metadata.id; +ALTER TABLE ONLY in_product_marketing_emails + ADD CONSTRAINT in_product_marketing_emails_pkey PRIMARY KEY (id); -CREATE TABLE users ( - id integer NOT NULL, - email character varying DEFAULT ''::character varying NOT NULL, - encrypted_password character varying DEFAULT ''::character varying NOT NULL, - reset_password_token character varying, - reset_password_sent_at timestamp without time zone, - remember_created_at timestamp without time zone, - sign_in_count integer DEFAULT 0, - current_sign_in_at timestamp without time zone, - last_sign_in_at timestamp without time zone, - current_sign_in_ip character varying, - last_sign_in_ip character varying, - created_at timestamp without time zone, - updated_at timestamp without time zone, - name character varying, - admin boolean DEFAULT false NOT NULL, - projects_limit integer NOT NULL, - skype character varying DEFAULT ''::character varying NOT NULL, - linkedin character varying DEFAULT ''::character varying NOT NULL, - twitter character varying DEFAULT ''::character varying NOT NULL, - failed_attempts integer DEFAULT 0, - locked_at timestamp without time zone, - username character varying, - can_create_group boolean DEFAULT true NOT NULL, - can_create_team boolean DEFAULT true NOT NULL, - state character varying, - color_scheme_id integer DEFAULT 1 NOT NULL, - password_expires_at timestamp without time zone, - created_by_id integer, - last_credential_check_at timestamp without time zone, - avatar character varying, - confirmation_token character varying, - confirmed_at timestamp without time zone, - confirmation_sent_at timestamp without time zone, - unconfirmed_email character varying, - hide_no_ssh_key boolean DEFAULT false, - website_url character varying DEFAULT ''::character varying NOT NULL, - notification_email character varying, - hide_no_password boolean DEFAULT false, - password_automatically_set boolean DEFAULT false, - location character varying, - encrypted_otp_secret character varying, - encrypted_otp_secret_iv character varying, - encrypted_otp_secret_salt character varying, - otp_required_for_login boolean DEFAULT false NOT NULL, - otp_backup_codes text, - public_email character varying DEFAULT ''::character varying NOT NULL, - dashboard integer DEFAULT 0, - project_view integer DEFAULT 0, - consumed_timestep integer, - layout integer DEFAULT 0, - hide_project_limit boolean DEFAULT false, - unlock_token character varying, - otp_grace_period_started_at timestamp without time zone, - external boolean DEFAULT false, - incoming_email_token character varying, - organization character varying, - require_two_factor_authentication_from_group boolean DEFAULT false NOT NULL, - two_factor_grace_period integer DEFAULT 48 NOT NULL, - last_activity_on date, - notified_of_own_activity boolean, - preferred_language character varying, - theme_id smallint, - include_private_contributions boolean, - feed_token character varying, - accepted_term_id integer, - private_profile boolean DEFAULT false NOT NULL, - commit_email character varying, - auditor boolean DEFAULT false NOT NULL, - admin_email_unsubscribed_at timestamp without time zone, - email_opted_in boolean, - email_opted_in_at timestamp without time zone, - email_opted_in_ip character varying, - email_opted_in_source_id integer, - group_view integer, - managing_group_id integer, - note text, - roadmap_layout smallint, - static_object_token character varying(255), - first_name character varying(255), - last_name character varying(255), - role smallint, - user_type smallint -); +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT inc_mgmnt_no_overlapping_oncall_shifts EXCLUDE USING gist (rotation_id WITH =, tstzrange(starts_at, ends_at, '[)'::text) WITH &&); -CREATE SEQUENCE users_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_escalation_policies + ADD CONSTRAINT incident_management_escalation_policies_pkey PRIMARY KEY (id); -ALTER SEQUENCE users_id_seq OWNED BY users.id; +ALTER TABLE ONLY incident_management_escalation_rules + ADD CONSTRAINT incident_management_escalation_rules_pkey PRIMARY KEY (id); -CREATE TABLE users_ops_dashboard_projects ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - user_id integer NOT NULL, - project_id integer NOT NULL -); +ALTER TABLE ONLY incident_management_issuable_escalation_statuses + ADD CONSTRAINT incident_management_issuable_escalation_statuses_pkey PRIMARY KEY (id); -CREATE SEQUENCE users_ops_dashboard_projects_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_oncall_participants + ADD CONSTRAINT incident_management_oncall_participants_pkey PRIMARY KEY (id); -ALTER SEQUENCE users_ops_dashboard_projects_id_seq OWNED BY users_ops_dashboard_projects.id; +ALTER TABLE ONLY incident_management_oncall_rotations + ADD CONSTRAINT incident_management_oncall_rotations_pkey PRIMARY KEY (id); -CREATE TABLE users_security_dashboard_projects ( - user_id bigint NOT NULL, - project_id bigint NOT NULL -); +ALTER TABLE ONLY incident_management_oncall_schedules + ADD CONSTRAINT incident_management_oncall_schedules_pkey PRIMARY KEY (id); -CREATE TABLE users_star_projects ( - id integer NOT NULL, - project_id integer NOT NULL, - user_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone -); +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT incident_management_oncall_shifts_pkey PRIMARY KEY (id); -CREATE SEQUENCE users_star_projects_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY incident_management_timeline_events + ADD CONSTRAINT incident_management_timeline_events_pkey PRIMARY KEY (id); -ALTER SEQUENCE users_star_projects_id_seq OWNED BY users_star_projects.id; +ALTER TABLE ONLY index_statuses + ADD CONSTRAINT index_statuses_pkey PRIMARY KEY (id); -CREATE TABLE users_statistics ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - without_groups_and_projects integer DEFAULT 0 NOT NULL, - with_highest_role_guest integer DEFAULT 0 NOT NULL, - with_highest_role_reporter integer DEFAULT 0 NOT NULL, - with_highest_role_developer integer DEFAULT 0 NOT NULL, - 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 -); +ALTER TABLE ONLY insights + ADD CONSTRAINT insights_pkey PRIMARY KEY (id); -CREATE SEQUENCE users_statistics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY integrations + ADD CONSTRAINT integrations_pkey PRIMARY KEY (id); -ALTER SEQUENCE users_statistics_id_seq OWNED BY users_statistics.id; +ALTER TABLE ONLY internal_ids + ADD CONSTRAINT internal_ids_pkey PRIMARY KEY (id); -CREATE TABLE vulnerabilities ( - id bigint NOT NULL, - milestone_id bigint, - epic_id bigint, - project_id bigint NOT NULL, - author_id bigint NOT NULL, - updated_by_id bigint, - last_edited_by_id bigint, - start_date_sourcing_milestone_id bigint, - due_date_sourcing_milestone_id bigint, - last_edited_at timestamp with time zone, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - start_date date, - due_date date, - state smallint DEFAULT 1 NOT NULL, - severity smallint NOT NULL, - confidence smallint NOT NULL, - severity_overridden boolean DEFAULT false, - confidence_overridden boolean DEFAULT false, - title character varying(255) NOT NULL, - title_html text, - description text, - description_html text, - report_type smallint NOT NULL, - cached_markdown_version integer, - resolved_by_id bigint, - resolved_at timestamp with time zone, - confirmed_by_id bigint, - confirmed_at timestamp with time zone, - dismissed_at timestamp with time zone, - dismissed_by_id bigint, - resolved_on_default_branch boolean DEFAULT false NOT NULL, - present_on_default_branch boolean DEFAULT true NOT NULL, - detected_at timestamp with time zone DEFAULT now() -); +ALTER TABLE ONLY ip_restrictions + ADD CONSTRAINT ip_restrictions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY issuable_metric_images + ADD CONSTRAINT issuable_metric_images_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerabilities_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issuable_severities + ADD CONSTRAINT issuable_severities_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerabilities_id_seq OWNED BY vulnerabilities.id; +ALTER TABLE ONLY issuable_slas + ADD CONSTRAINT issuable_slas_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_exports ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - started_at timestamp with time zone, - finished_at timestamp with time zone, - status character varying(255) NOT NULL, - file character varying(255), - project_id bigint, - author_id bigint NOT NULL, - file_store integer, - format smallint DEFAULT 0 NOT NULL, - group_id integer -); +ALTER TABLE ONLY issue_assignees + ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_id, user_id); -CREATE SEQUENCE vulnerability_exports_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issue_customer_relations_contacts + ADD CONSTRAINT issue_customer_relations_contacts_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_exports_id_seq OWNED BY vulnerability_exports.id; +ALTER TABLE ONLY issue_email_participants + ADD CONSTRAINT issue_email_participants_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_external_issue_links ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - author_id bigint NOT NULL, - vulnerability_id bigint NOT NULL, - link_type smallint DEFAULT 1 NOT NULL, - external_type smallint DEFAULT 1 NOT NULL, - external_project_key text NOT NULL, - external_issue_key text NOT NULL, - CONSTRAINT check_3200604f5e CHECK ((char_length(external_issue_key) <= 255)), - CONSTRAINT check_68cffd19b0 CHECK ((char_length(external_project_key) <= 255)) -); +ALTER TABLE ONLY issue_emails + ADD CONSTRAINT issue_emails_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_external_issue_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issue_links + ADD CONSTRAINT issue_links_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_external_issue_links_id_seq OWNED BY vulnerability_external_issue_links.id; +ALTER TABLE ONLY issue_metrics + ADD CONSTRAINT issue_metrics_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_feedback ( - id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - feedback_type smallint NOT NULL, - category smallint NOT NULL, - project_id integer NOT NULL, - author_id integer NOT NULL, - pipeline_id integer, - issue_id integer, - project_fingerprint character varying(40) NOT NULL, - merge_request_id integer, - comment_author_id integer, - comment text, - comment_timestamp timestamp with time zone, - finding_uuid uuid, - dismissal_reason smallint -); +ALTER TABLE ONLY issue_tracker_data + ADD CONSTRAINT issue_tracker_data_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_feedback_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issue_user_mentions + ADD CONSTRAINT issue_user_mentions_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_feedback_id_seq OWNED BY vulnerability_feedback.id; +ALTER TABLE ONLY issues + ADD CONSTRAINT issues_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY issues_prometheus_alert_events + ADD CONSTRAINT issues_prometheus_alert_events_pkey PRIMARY KEY (issue_id, prometheus_alert_event_id); -CREATE SEQUENCE vulnerability_finding_evidence_assets_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY issues_self_managed_prometheus_alert_events + ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id); -ALTER SEQUENCE vulnerability_finding_evidence_assets_id_seq OWNED BY vulnerability_finding_evidence_assets.id; +ALTER TABLE ONLY sprints + ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint EXCLUDE USING gist (iterations_cadence_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((group_id IS NOT NULL)); -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)) -); +ALTER TABLE ONLY sprints + ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((project_id IS NOT NULL)); -CREATE SEQUENCE vulnerability_finding_evidence_headers_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY iterations_cadences + ADD CONSTRAINT iterations_cadences_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidence_headers_id_seq OWNED BY vulnerability_finding_evidence_headers.id; +ALTER TABLE ONLY jira_connect_installations + ADD CONSTRAINT jira_connect_installations_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY jira_connect_subscriptions + ADD CONSTRAINT jira_connect_subscriptions_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_evidence_requests_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY jira_imports + ADD CONSTRAINT jira_imports_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidence_requests_id_seq OWNED BY vulnerability_finding_evidence_requests.id; +ALTER TABLE ONLY jira_tracker_data + ADD CONSTRAINT jira_tracker_data_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY keys + ADD CONSTRAINT keys_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_evidence_responses_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY label_links + ADD CONSTRAINT label_links_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidence_responses_id_seq OWNED BY vulnerability_finding_evidence_responses.id; +ALTER TABLE ONLY label_priorities + ADD CONSTRAINT label_priorities_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY labels + ADD CONSTRAINT labels_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_evidence_sources_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY ldap_group_links + ADD CONSTRAINT ldap_group_links_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidence_sources_id_seq OWNED BY vulnerability_finding_evidence_sources.id; +ALTER TABLE ONLY lfs_file_locks + ADD CONSTRAINT lfs_file_locks_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY lfs_object_states + ADD CONSTRAINT lfs_object_states_pkey PRIMARY KEY (lfs_object_id); -CREATE SEQUENCE vulnerability_finding_evidence_supporting_messages_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY lfs_objects + ADD CONSTRAINT lfs_objects_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidence_supporting_messages_id_seq OWNED BY vulnerability_finding_evidence_supporting_messages.id; +ALTER TABLE ONLY lfs_objects_projects + ADD CONSTRAINT lfs_objects_projects_pkey PRIMARY KEY (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)) -); +ALTER TABLE ONLY licenses + ADD CONSTRAINT licenses_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_evidences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY list_user_preferences + ADD CONSTRAINT list_user_preferences_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_evidences_id_seq OWNED BY vulnerability_finding_evidences.id; +ALTER TABLE ONLY lists + ADD CONSTRAINT lists_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_finding_links ( - 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, - name text, - url text NOT NULL, - CONSTRAINT check_55f0a95439 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_b7fe886df6 CHECK ((char_length(url) <= 2048)) -); +ALTER TABLE ONLY member_tasks + ADD CONSTRAINT member_tasks_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY members + ADD CONSTRAINT members_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_assignees + ADD CONSTRAINT merge_request_assignees_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_blocks + ADD CONSTRAINT merge_request_blocks_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_cleanup_schedules + ADD CONSTRAINT merge_request_cleanup_schedules_pkey PRIMARY KEY (merge_request_id); + +ALTER TABLE ONLY merge_request_context_commit_diff_files + ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order); + +ALTER TABLE ONLY merge_request_context_commits + ADD CONSTRAINT merge_request_context_commits_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_diff_commit_users + ADD CONSTRAINT merge_request_diff_commit_users_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_diff_commits + ADD CONSTRAINT merge_request_diff_commits_pkey PRIMARY KEY (merge_request_diff_id, relative_order); + +ALTER TABLE ONLY merge_request_diff_details + ADD CONSTRAINT merge_request_diff_details_pkey PRIMARY KEY (merge_request_diff_id); + +ALTER TABLE ONLY merge_request_diff_files + ADD CONSTRAINT merge_request_diff_files_pkey PRIMARY KEY (merge_request_diff_id, relative_order); + +ALTER TABLE ONLY merge_request_diffs + ADD CONSTRAINT merge_request_diffs_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_metrics + ADD CONSTRAINT merge_request_metrics_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY merge_request_reviewers + ADD CONSTRAINT merge_request_reviewers_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_request_user_mentions + ADD CONSTRAINT merge_request_user_mentions_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_links_id_seq OWNED BY vulnerability_finding_links.id; +ALTER TABLE ONLY merge_requests_closing_issues + ADD CONSTRAINT merge_requests_closing_issues_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_finding_signatures ( - id bigint NOT NULL, - finding_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - algorithm_type smallint NOT NULL, - signature_sha bytea NOT NULL -); +ALTER TABLE ONLY merge_requests_compliance_violations + ADD CONSTRAINT merge_requests_compliance_violations_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_finding_signatures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY merge_requests + ADD CONSTRAINT merge_requests_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_finding_signatures_id_seq OWNED BY vulnerability_finding_signatures.id; +ALTER TABLE ONLY merge_trains + ADD CONSTRAINT merge_trains_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_findings_remediations ( - id bigint NOT NULL, - vulnerability_occurrence_id bigint, - vulnerability_remediation_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY metrics_dashboard_annotations + ADD CONSTRAINT metrics_dashboard_annotations_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_findings_remediations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY metrics_users_starred_dashboards + ADD CONSTRAINT metrics_users_starred_dashboards_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_findings_remediations_id_seq OWNED BY vulnerability_findings_remediations.id; +ALTER TABLE ONLY milestone_releases + ADD CONSTRAINT milestone_releases_pkey PRIMARY KEY (milestone_id, release_id); -CREATE TABLE vulnerability_flags ( - 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, - flag_type smallint DEFAULT 0 NOT NULL, - origin text NOT NULL, - description text NOT NULL, - CONSTRAINT check_45e743349f CHECK ((char_length(description) <= 1024)), - CONSTRAINT check_49c1d00032 CHECK ((char_length(origin) <= 255)) -); +ALTER TABLE ONLY milestones + ADD CONSTRAINT milestones_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_flags_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY namespace_admin_notes + ADD CONSTRAINT namespace_admin_notes_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_flags_id_seq OWNED BY vulnerability_flags.id; +ALTER TABLE ONLY namespace_aggregation_schedules + ADD CONSTRAINT namespace_aggregation_schedules_pkey PRIMARY KEY (namespace_id); -CREATE TABLE vulnerability_historical_statistics ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - total integer DEFAULT 0 NOT NULL, - critical integer DEFAULT 0 NOT NULL, - high integer DEFAULT 0 NOT NULL, - medium integer DEFAULT 0 NOT NULL, - low integer DEFAULT 0 NOT NULL, - unknown integer DEFAULT 0 NOT NULL, - info integer DEFAULT 0 NOT NULL, - date date NOT NULL, - letter_grade smallint NOT NULL -); +ALTER TABLE ONLY namespace_limits + ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id); -CREATE SEQUENCE vulnerability_historical_statistics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY namespace_package_settings + ADD CONSTRAINT namespace_package_settings_pkey PRIMARY KEY (namespace_id); -ALTER SEQUENCE vulnerability_historical_statistics_id_seq OWNED BY vulnerability_historical_statistics.id; +ALTER TABLE ONLY namespace_root_storage_statistics + ADD CONSTRAINT namespace_root_storage_statistics_pkey PRIMARY KEY (namespace_id); -CREATE TABLE vulnerability_identifiers ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - fingerprint bytea NOT NULL, - external_type character varying NOT NULL, - external_id character varying NOT NULL, - name character varying NOT NULL, - url text -); +ALTER TABLE ONLY namespace_settings + ADD CONSTRAINT namespace_settings_pkey PRIMARY KEY (namespace_id); -CREATE SEQUENCE vulnerability_identifiers_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY namespace_statistics + ADD CONSTRAINT namespace_statistics_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_identifiers_id_seq OWNED BY vulnerability_identifiers.id; +ALTER TABLE ONLY namespaces + ADD CONSTRAINT namespaces_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_issue_links ( - id bigint NOT NULL, - vulnerability_id bigint NOT NULL, - issue_id bigint NOT NULL, - link_type smallint DEFAULT 1 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL -); +ALTER TABLE ONLY namespaces_sync_events + ADD CONSTRAINT namespaces_sync_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_issue_links_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY note_diff_files + ADD CONSTRAINT note_diff_files_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_issue_links_id_seq OWNED BY vulnerability_issue_links.id; +ALTER TABLE ONLY notes + ADD CONSTRAINT notes_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_occurrence_identifiers ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - occurrence_id bigint NOT NULL, - identifier_id bigint NOT NULL -); +ALTER TABLE ONLY notification_settings + ADD CONSTRAINT notification_settings_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_occurrence_identifiers_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY oauth_access_grants + ADD CONSTRAINT oauth_access_grants_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_occurrence_identifiers_id_seq OWNED BY vulnerability_occurrence_identifiers.id; +ALTER TABLE ONLY oauth_access_tokens + ADD CONSTRAINT oauth_access_tokens_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_occurrence_pipelines ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - occurrence_id bigint NOT NULL, - pipeline_id integer NOT NULL -); +ALTER TABLE ONLY oauth_applications + ADD CONSTRAINT oauth_applications_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_occurrence_pipelines_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY oauth_openid_requests + ADD CONSTRAINT oauth_openid_requests_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_occurrence_pipelines_id_seq OWNED BY vulnerability_occurrence_pipelines.id; +ALTER TABLE ONLY onboarding_progresses + ADD CONSTRAINT onboarding_progresses_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_occurrences ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - severity smallint NOT NULL, - confidence smallint NOT NULL, - report_type smallint NOT NULL, - project_id integer NOT NULL, - scanner_id bigint NOT NULL, - primary_identifier_id bigint NOT NULL, - project_fingerprint bytea NOT NULL, - location_fingerprint bytea NOT NULL, - uuid character varying(36) NOT NULL, - name character varying NOT NULL, - metadata_version character varying NOT NULL, - raw_metadata text NOT NULL, - vulnerability_id bigint, - details jsonb DEFAULT '{}'::jsonb NOT NULL, - description text, - message text, - solution text, - cve text, - location jsonb, - detection_method smallint DEFAULT 0 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)), - CONSTRAINT check_f602da68dd CHECK ((char_length(cve) <= 48400)) -); +ALTER TABLE ONLY operations_feature_flag_scopes + ADD CONSTRAINT operations_feature_flag_scopes_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_occurrences_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY operations_feature_flags_clients + ADD CONSTRAINT operations_feature_flags_clients_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_occurrences_id_seq OWNED BY vulnerability_occurrences.id; +ALTER TABLE ONLY operations_feature_flags_issues + ADD CONSTRAINT operations_feature_flags_issues_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_remediations ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - file_store smallint, - summary text NOT NULL, - file text NOT NULL, - checksum bytea NOT NULL, - project_id bigint NOT NULL, - CONSTRAINT check_ac0ccabff3 CHECK ((char_length(summary) <= 200)), - CONSTRAINT check_fe3325e3ba CHECK ((char_length(file) <= 255)) -); +ALTER TABLE ONLY operations_feature_flags + ADD CONSTRAINT operations_feature_flags_pkey PRIMARY KEY (id); -COMMENT ON COLUMN vulnerability_remediations.checksum IS 'Stores the SHA256 checksum of the attached diff file'; +ALTER TABLE ONLY operations_scopes + ADD CONSTRAINT operations_scopes_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_remediations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY operations_strategies + ADD CONSTRAINT operations_strategies_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY operations_strategies_user_lists + ADD CONSTRAINT operations_strategies_user_lists_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY operations_user_lists + ADD CONSTRAINT operations_user_lists_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_remediations_id_seq OWNED BY vulnerability_remediations.id; +ALTER TABLE ONLY packages_build_infos + ADD CONSTRAINT packages_build_infos_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_scanners ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL, - external_id character varying NOT NULL, - name character varying NOT NULL, - vendor text DEFAULT 'GitLab'::text NOT NULL -); +ALTER TABLE ONLY packages_composer_cache_files + ADD CONSTRAINT packages_composer_cache_files_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_scanners_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_composer_metadata + ADD CONSTRAINT packages_composer_metadata_pkey PRIMARY KEY (package_id); -ALTER SEQUENCE vulnerability_scanners_id_seq OWNED BY vulnerability_scanners.id; +ALTER TABLE ONLY packages_conan_file_metadata + ADD CONSTRAINT packages_conan_file_metadata_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_statistics ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - total integer DEFAULT 0 NOT NULL, - critical integer DEFAULT 0 NOT NULL, - high integer DEFAULT 0 NOT NULL, - medium integer DEFAULT 0 NOT NULL, - low integer DEFAULT 0 NOT NULL, - unknown integer DEFAULT 0 NOT NULL, - info integer DEFAULT 0 NOT NULL, - letter_grade smallint NOT NULL, - latest_pipeline_id bigint -); +ALTER TABLE ONLY packages_conan_metadata + ADD CONSTRAINT packages_conan_metadata_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_statistics_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_debian_file_metadata + ADD CONSTRAINT packages_debian_file_metadata_pkey PRIMARY KEY (package_file_id); -ALTER SEQUENCE vulnerability_statistics_id_seq OWNED BY vulnerability_statistics.id; +ALTER TABLE ONLY packages_debian_group_architectures + ADD CONSTRAINT packages_debian_group_architectures_pkey PRIMARY KEY (id); -CREATE TABLE vulnerability_user_mentions ( - id bigint NOT NULL, - vulnerability_id bigint NOT NULL, - note_id integer, - mentioned_users_ids integer[], - mentioned_projects_ids integer[], - mentioned_groups_ids integer[] -); +ALTER TABLE ONLY packages_debian_group_component_files + ADD CONSTRAINT packages_debian_group_component_files_pkey PRIMARY KEY (id); -CREATE SEQUENCE vulnerability_user_mentions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_debian_group_components + ADD CONSTRAINT packages_debian_group_components_pkey PRIMARY KEY (id); -ALTER SEQUENCE vulnerability_user_mentions_id_seq OWNED BY vulnerability_user_mentions.id; +ALTER TABLE ONLY packages_debian_group_distribution_keys + ADD CONSTRAINT packages_debian_group_distribution_keys_pkey PRIMARY KEY (id); -CREATE TABLE web_hooks ( - id integer NOT NULL, - project_id integer, - created_at timestamp without time zone, - updated_at timestamp without time zone, - type character varying DEFAULT 'ProjectHook'::character varying, - service_id integer, - push_events boolean DEFAULT true NOT NULL, - issues_events boolean DEFAULT false NOT NULL, - merge_requests_events boolean DEFAULT false NOT NULL, - tag_push_events boolean DEFAULT false, - note_events boolean DEFAULT false NOT NULL, - enable_ssl_verification boolean DEFAULT true, - wiki_page_events boolean DEFAULT false NOT NULL, - pipeline_events boolean DEFAULT false NOT NULL, - confidential_issues_events boolean DEFAULT false NOT NULL, - repository_update_events boolean DEFAULT false NOT NULL, - job_events boolean DEFAULT false NOT NULL, - confidential_note_events boolean, - push_events_branch_filter text, - encrypted_token character varying, - encrypted_token_iv character varying, - encrypted_url character varying, - encrypted_url_iv character varying, - group_id integer, - deployment_events boolean DEFAULT false NOT NULL, - feature_flag_events boolean DEFAULT false NOT NULL, - releases_events boolean DEFAULT false NOT NULL, - member_events boolean DEFAULT false NOT NULL, - subgroup_events boolean DEFAULT false NOT NULL, - recent_failures smallint DEFAULT 0 NOT NULL, - backoff_count smallint DEFAULT 0 NOT NULL, - disabled_until timestamp with time zone -); +ALTER TABLE ONLY packages_debian_group_distributions + ADD CONSTRAINT packages_debian_group_distributions_pkey PRIMARY KEY (id); -CREATE SEQUENCE web_hooks_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_debian_project_architectures + ADD CONSTRAINT packages_debian_project_architectures_pkey PRIMARY KEY (id); -ALTER SEQUENCE web_hooks_id_seq OWNED BY web_hooks.id; +ALTER TABLE ONLY packages_debian_project_component_files + ADD CONSTRAINT packages_debian_project_component_files_pkey PRIMARY KEY (id); -CREATE TABLE webauthn_registrations ( - id bigint NOT NULL, - user_id bigint NOT NULL, - counter bigint DEFAULT 0 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - credential_xid text NOT NULL, - name text NOT NULL, - public_key text NOT NULL, - u2f_registration_id integer, - CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_e54008d9ce CHECK ((char_length(credential_xid) <= 340)) -); +ALTER TABLE ONLY packages_debian_project_components + ADD CONSTRAINT packages_debian_project_components_pkey PRIMARY KEY (id); -CREATE SEQUENCE webauthn_registrations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_debian_project_distribution_keys + ADD CONSTRAINT packages_debian_project_distribution_keys_pkey PRIMARY KEY (id); -ALTER SEQUENCE webauthn_registrations_id_seq OWNED BY webauthn_registrations.id; +ALTER TABLE ONLY packages_debian_project_distributions + ADD CONSTRAINT packages_debian_project_distributions_pkey PRIMARY KEY (id); -CREATE TABLE wiki_page_meta ( - id integer NOT NULL, - project_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - title character varying(255) NOT NULL -); +ALTER TABLE ONLY packages_debian_publications + ADD CONSTRAINT packages_debian_publications_pkey PRIMARY KEY (id); -CREATE SEQUENCE wiki_page_meta_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_dependencies + ADD CONSTRAINT packages_dependencies_pkey PRIMARY KEY (id); -ALTER SEQUENCE wiki_page_meta_id_seq OWNED BY wiki_page_meta.id; +ALTER TABLE ONLY packages_dependency_links + ADD CONSTRAINT packages_dependency_links_pkey PRIMARY KEY (id); -CREATE TABLE wiki_page_slugs ( - id integer NOT NULL, - canonical boolean DEFAULT false NOT NULL, - wiki_page_meta_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - slug character varying(2048) NOT NULL -); +ALTER TABLE ONLY packages_events + ADD CONSTRAINT packages_events_pkey PRIMARY KEY (id); -CREATE SEQUENCE wiki_page_slugs_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_helm_file_metadata + ADD CONSTRAINT packages_helm_file_metadata_pkey PRIMARY KEY (package_file_id); -ALTER SEQUENCE wiki_page_slugs_id_seq OWNED BY wiki_page_slugs.id; +ALTER TABLE ONLY packages_maven_metadata + ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id); -CREATE TABLE work_item_types ( - id bigint NOT NULL, - base_type smallint DEFAULT 0 NOT NULL, - cached_markdown_version integer, - name text NOT NULL, - description text, - description_html text, - icon_name text, - namespace_id bigint, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - CONSTRAINT check_104d2410f6 CHECK ((char_length(name) <= 255)), - CONSTRAINT check_fecb3a98d1 CHECK ((char_length(icon_name) <= 255)) -); +ALTER TABLE ONLY packages_npm_metadata + ADD CONSTRAINT packages_npm_metadata_pkey PRIMARY KEY (package_id); -CREATE SEQUENCE work_item_types_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_nuget_dependency_link_metadata + ADD CONSTRAINT packages_nuget_dependency_link_metadata_pkey PRIMARY KEY (dependency_link_id); -ALTER SEQUENCE work_item_types_id_seq OWNED BY work_item_types.id; +ALTER TABLE ONLY packages_nuget_metadata + ADD CONSTRAINT packages_nuget_metadata_pkey PRIMARY KEY (package_id); -CREATE TABLE x509_certificates ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - subject_key_identifier character varying(255) NOT NULL, - subject character varying(255) NOT NULL, - email character varying(255) NOT NULL, - serial_number bytea NOT NULL, - certificate_status smallint DEFAULT 0 NOT NULL, - x509_issuer_id bigint NOT NULL -); +ALTER TABLE ONLY packages_package_file_build_infos + ADD CONSTRAINT packages_package_file_build_infos_pkey PRIMARY KEY (id); -CREATE SEQUENCE x509_certificates_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_package_files + ADD CONSTRAINT packages_package_files_pkey PRIMARY KEY (id); -ALTER SEQUENCE x509_certificates_id_seq OWNED BY x509_certificates.id; +ALTER TABLE ONLY packages_packages + ADD CONSTRAINT packages_packages_pkey PRIMARY KEY (id); -CREATE TABLE x509_commit_signatures ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - project_id bigint NOT NULL, - x509_certificate_id bigint NOT NULL, - commit_sha bytea NOT NULL, - verification_status smallint DEFAULT 0 NOT NULL -); +ALTER TABLE ONLY packages_pypi_metadata + ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id); + +ALTER TABLE ONLY packages_rubygems_metadata + ADD CONSTRAINT packages_rubygems_metadata_pkey PRIMARY KEY (package_id); -CREATE SEQUENCE x509_commit_signatures_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY packages_tags + ADD CONSTRAINT packages_tags_pkey PRIMARY KEY (id); -ALTER SEQUENCE x509_commit_signatures_id_seq OWNED BY x509_commit_signatures.id; +ALTER TABLE ONLY pages_deployment_states + ADD CONSTRAINT pages_deployment_states_pkey PRIMARY KEY (pages_deployment_id); -CREATE TABLE x509_issuers ( - id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - subject_key_identifier character varying(255) NOT NULL, - subject character varying(255) NOT NULL, - crl_url character varying(255) NOT NULL -); +ALTER TABLE ONLY pages_deployments + ADD CONSTRAINT pages_deployments_pkey PRIMARY KEY (id); -CREATE SEQUENCE x509_issuers_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY pages_domain_acme_orders + ADD CONSTRAINT pages_domain_acme_orders_pkey PRIMARY KEY (id); -ALTER SEQUENCE x509_issuers_id_seq OWNED BY x509_issuers.id; +ALTER TABLE ONLY pages_domains + ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id); -CREATE TABLE zentao_tracker_data ( - id bigint NOT NULL, - integration_id bigint NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - encrypted_url bytea, - encrypted_url_iv bytea, - encrypted_api_url bytea, - encrypted_api_url_iv bytea, - encrypted_zentao_product_xid bytea, - encrypted_zentao_product_xid_iv bytea, - encrypted_api_token bytea, - encrypted_api_token_iv bytea -); +ALTER TABLE ONLY path_locks + ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id); -CREATE SEQUENCE zentao_tracker_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY personal_access_tokens + ADD CONSTRAINT personal_access_tokens_pkey PRIMARY KEY (id); -ALTER SEQUENCE zentao_tracker_data_id_seq OWNED BY zentao_tracker_data.id; +ALTER TABLE ONLY plan_limits + ADD CONSTRAINT plan_limits_pkey PRIMARY KEY (id); -CREATE TABLE zoom_meetings ( - id bigint NOT NULL, - project_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, - issue_status smallint DEFAULT 1 NOT NULL, - url character varying(255) -); +ALTER TABLE ONLY plans + ADD CONSTRAINT plans_pkey PRIMARY KEY (id); -CREATE SEQUENCE zoom_meetings_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +ALTER TABLE ONLY pool_repositories + ADD CONSTRAINT pool_repositories_pkey PRIMARY KEY (id); -ALTER SEQUENCE zoom_meetings_id_seq OWNED BY zoom_meetings.id; +ALTER TABLE ONLY postgres_async_indexes + ADD CONSTRAINT postgres_async_indexes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass); +ALTER TABLE ONLY postgres_reindex_actions + ADD CONSTRAINT postgres_reindex_actions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY agent_group_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_group_authorizations_id_seq'::regclass); +ALTER TABLE ONLY postgres_reindex_queued_actions + ADD CONSTRAINT postgres_reindex_queued_actions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY alert_management_alert_assignees ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_assignees_id_seq'::regclass); +ALTER TABLE ONLY programming_languages + ADD CONSTRAINT programming_languages_pkey PRIMARY KEY (id); -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 project_access_tokens + ADD CONSTRAINT project_access_tokens_pkey PRIMARY KEY (personal_access_token_id, project_id); -ALTER TABLE ONLY alert_management_alerts ALTER COLUMN id SET DEFAULT nextval('alert_management_alerts_id_seq'::regclass); +ALTER TABLE ONLY project_alerting_settings + ADD CONSTRAINT project_alerting_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY alert_management_http_integrations ALTER COLUMN id SET DEFAULT nextval('alert_management_http_integrations_id_seq'::regclass); +ALTER TABLE ONLY project_aliases + ADD CONSTRAINT project_aliases_pkey PRIMARY KEY (id); -ALTER TABLE ONLY allowed_email_domains ALTER COLUMN id SET DEFAULT nextval('allowed_email_domains_id_seq'::regclass); +ALTER TABLE ONLY project_authorizations + ADD CONSTRAINT project_authorizations_pkey PRIMARY KEY (user_id, project_id, access_level); -ALTER TABLE ONLY analytics_cycle_analytics_group_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_stages_id_seq'::regclass); +ALTER TABLE ONLY project_auto_devops + ADD CONSTRAINT project_auto_devops_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_value_streams_id_seq'::regclass); +ALTER TABLE ONLY project_build_artifacts_size_refreshes + ADD CONSTRAINT project_build_artifacts_size_refreshes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_cycle_analytics_project_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_project_stages_id_seq'::regclass); +ALTER TABLE ONLY project_ci_cd_settings + ADD CONSTRAINT project_ci_cd_settings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_project_value_streams_id_seq'::regclass); +ALTER TABLE ONLY project_ci_feature_usages + ADD CONSTRAINT project_ci_feature_usages_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_stage_event_hashes_id_seq'::regclass); +ALTER TABLE ONLY project_compliance_framework_settings + ADD CONSTRAINT project_compliance_framework_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY analytics_devops_adoption_segments ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_segments_id_seq'::regclass); +ALTER TABLE ONLY project_custom_attributes + ADD CONSTRAINT project_custom_attributes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_devops_adoption_snapshots ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_snapshots_id_seq'::regclass); +ALTER TABLE ONLY project_daily_statistics + ADD CONSTRAINT project_daily_statistics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_usage_trends_measurements ALTER COLUMN id SET DEFAULT nextval('analytics_usage_trends_measurements_id_seq'::regclass); +ALTER TABLE ONLY project_deploy_tokens + ADD CONSTRAINT project_deploy_tokens_pkey PRIMARY KEY (id); -ALTER TABLE ONLY appearances ALTER COLUMN id SET DEFAULT nextval('appearances_id_seq'::regclass); +ALTER TABLE ONLY project_error_tracking_settings + ADD CONSTRAINT project_error_tracking_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY application_setting_terms ALTER COLUMN id SET DEFAULT nextval('application_setting_terms_id_seq'::regclass); +ALTER TABLE ONLY project_export_jobs + ADD CONSTRAINT project_export_jobs_pkey PRIMARY KEY (id); -ALTER TABLE ONLY application_settings ALTER COLUMN id SET DEFAULT nextval('application_settings_id_seq'::regclass); +ALTER TABLE ONLY project_feature_usages + ADD CONSTRAINT project_feature_usages_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY approval_merge_request_rule_sources ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rule_sources_id_seq'::regclass); +ALTER TABLE ONLY project_features + ADD CONSTRAINT project_features_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approval_merge_request_rules ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_id_seq'::regclass); +ALTER TABLE ONLY project_group_links + ADD CONSTRAINT project_group_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approval_merge_request_rules_approved_approvers ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_approved_approvers_id_seq'::regclass); +ALTER TABLE ONLY project_import_data + ADD CONSTRAINT project_import_data_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approval_merge_request_rules_groups ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_groups_id_seq'::regclass); +ALTER TABLE ONLY project_incident_management_settings + ADD CONSTRAINT project_incident_management_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY approval_merge_request_rules_users ALTER COLUMN id SET DEFAULT nextval('approval_merge_request_rules_users_id_seq'::regclass); +ALTER TABLE ONLY project_metrics_settings + ADD CONSTRAINT project_metrics_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY approval_project_rules ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_id_seq'::regclass); +ALTER TABLE ONLY project_mirror_data + ADD CONSTRAINT project_mirror_data_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approval_project_rules_groups ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_groups_id_seq'::regclass); +ALTER TABLE ONLY project_pages_metadata + ADD CONSTRAINT project_pages_metadata_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY approval_project_rules_users ALTER COLUMN id SET DEFAULT nextval('approval_project_rules_users_id_seq'::regclass); +ALTER TABLE ONLY project_repositories + ADD CONSTRAINT project_repositories_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approvals ALTER COLUMN id SET DEFAULT nextval('approvals_id_seq'::regclass); +ALTER TABLE ONLY project_repository_states + ADD CONSTRAINT project_repository_states_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approver_groups ALTER COLUMN id SET DEFAULT nextval('approver_groups_id_seq'::regclass); +ALTER TABLE ONLY project_repository_storage_moves + ADD CONSTRAINT project_repository_storage_moves_pkey PRIMARY KEY (id); -ALTER TABLE ONLY approvers ALTER COLUMN id SET DEFAULT nextval('approvers_id_seq'::regclass); +ALTER TABLE ONLY project_security_settings + ADD CONSTRAINT project_security_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY atlassian_identities ALTER COLUMN user_id SET DEFAULT nextval('atlassian_identities_user_id_seq'::regclass); +ALTER TABLE ONLY project_settings + ADD CONSTRAINT project_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_id_seq'::regclass); +ALTER TABLE ONLY project_statistics + ADD CONSTRAINT project_statistics_pkey PRIMARY KEY (id); -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 project_topics + ADD CONSTRAINT project_topics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass); +ALTER TABLE ONLY project_tracing_settings + ADD CONSTRAINT project_tracing_settings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass); +ALTER TABLE ONLY projects + ADD CONSTRAINT projects_pkey PRIMARY KEY (id); -ALTER TABLE ONLY background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('background_migration_jobs_id_seq'::regclass); +ALTER TABLE ONLY projects_sync_events + ADD CONSTRAINT projects_sync_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY badges ALTER COLUMN id SET DEFAULT nextval('badges_id_seq'::regclass); +ALTER TABLE ONLY prometheus_alert_events + ADD CONSTRAINT prometheus_alert_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY batched_background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('batched_background_migration_jobs_id_seq'::regclass); +ALTER TABLE ONLY prometheus_alerts + ADD CONSTRAINT prometheus_alerts_pkey PRIMARY KEY (id); -ALTER TABLE ONLY batched_background_migrations ALTER COLUMN id SET DEFAULT nextval('batched_background_migrations_id_seq'::regclass); +ALTER TABLE ONLY prometheus_metrics + ADD CONSTRAINT prometheus_metrics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY board_assignees ALTER COLUMN id SET DEFAULT nextval('board_assignees_id_seq'::regclass); +ALTER TABLE ONLY protected_branch_merge_access_levels + ADD CONSTRAINT protected_branch_merge_access_levels_pkey PRIMARY KEY (id); -ALTER TABLE ONLY board_group_recent_visits ALTER COLUMN id SET DEFAULT nextval('board_group_recent_visits_id_seq'::regclass); +ALTER TABLE ONLY protected_branch_push_access_levels + ADD CONSTRAINT protected_branch_push_access_levels_pkey PRIMARY KEY (id); -ALTER TABLE ONLY board_labels ALTER COLUMN id SET DEFAULT nextval('board_labels_id_seq'::regclass); +ALTER TABLE ONLY protected_branch_unprotect_access_levels + ADD CONSTRAINT protected_branch_unprotect_access_levels_pkey PRIMARY KEY (id); -ALTER TABLE ONLY board_project_recent_visits ALTER COLUMN id SET DEFAULT nextval('board_project_recent_visits_id_seq'::regclass); +ALTER TABLE ONLY protected_branches + ADD CONSTRAINT protected_branches_pkey PRIMARY KEY (id); -ALTER TABLE ONLY board_user_preferences ALTER COLUMN id SET DEFAULT nextval('board_user_preferences_id_seq'::regclass); +ALTER TABLE ONLY protected_environment_approval_rules + ADD CONSTRAINT protected_environment_approval_rules_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards ALTER COLUMN id SET DEFAULT nextval('boards_id_seq'::regclass); +ALTER TABLE ONLY protected_environment_deploy_access_levels + ADD CONSTRAINT protected_environment_deploy_access_levels_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_board_labels ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_labels_id_seq'::regclass); +ALTER TABLE ONLY protected_environments + ADD CONSTRAINT protected_environments_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_board_positions ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_positions_id_seq'::regclass); +ALTER TABLE ONLY protected_tag_create_access_levels + ADD CONSTRAINT protected_tag_create_access_levels_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_board_recent_visits ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_recent_visits_id_seq'::regclass); +ALTER TABLE ONLY protected_tags + ADD CONSTRAINT protected_tags_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_boards ALTER COLUMN id SET DEFAULT nextval('boards_epic_boards_id_seq'::regclass); +ALTER TABLE ONLY push_event_payloads + ADD CONSTRAINT push_event_payloads_pkey PRIMARY KEY (event_id); -ALTER TABLE ONLY boards_epic_list_user_preferences ALTER COLUMN id SET DEFAULT nextval('boards_epic_list_user_preferences_id_seq'::regclass); +ALTER TABLE ONLY push_rules + ADD CONSTRAINT push_rules_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_lists ALTER COLUMN id SET DEFAULT nextval('boards_epic_lists_id_seq'::regclass); +ALTER TABLE ONLY raw_usage_data + ADD CONSTRAINT raw_usage_data_pkey PRIMARY KEY (id); -ALTER TABLE ONLY boards_epic_user_preferences ALTER COLUMN id SET DEFAULT nextval('boards_epic_user_preferences_id_seq'::regclass); +ALTER TABLE ONLY redirect_routes + ADD CONSTRAINT redirect_routes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY broadcast_messages ALTER COLUMN id SET DEFAULT nextval('broadcast_messages_id_seq'::regclass); +ALTER TABLE ONLY related_epic_links + ADD CONSTRAINT related_epic_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY bulk_import_configurations ALTER COLUMN id SET DEFAULT nextval('bulk_import_configurations_id_seq'::regclass); +ALTER TABLE ONLY release_links + ADD CONSTRAINT release_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY bulk_import_entities ALTER COLUMN id SET DEFAULT nextval('bulk_import_entities_id_seq'::regclass); +ALTER TABLE releases + ADD CONSTRAINT releases_not_null_tag CHECK ((tag IS NOT NULL)) NOT VALID; -ALTER TABLE ONLY bulk_import_export_uploads ALTER COLUMN id SET DEFAULT nextval('bulk_import_export_uploads_id_seq'::regclass); +ALTER TABLE ONLY releases + ADD CONSTRAINT releases_pkey PRIMARY KEY (id); -ALTER TABLE ONLY bulk_import_exports ALTER COLUMN id SET DEFAULT nextval('bulk_import_exports_id_seq'::regclass); +ALTER TABLE ONLY remote_mirrors + ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id); -ALTER TABLE ONLY bulk_import_failures ALTER COLUMN id SET DEFAULT nextval('bulk_import_failures_id_seq'::regclass); +ALTER TABLE ONLY repository_languages + ADD CONSTRAINT repository_languages_pkey PRIMARY KEY (project_id, programming_language_id); -ALTER TABLE ONLY bulk_import_trackers ALTER COLUMN id SET DEFAULT nextval('bulk_import_trackers_id_seq'::regclass); +ALTER TABLE ONLY required_code_owners_sections + ADD CONSTRAINT required_code_owners_sections_pkey PRIMARY KEY (id); -ALTER TABLE ONLY bulk_imports ALTER COLUMN id SET DEFAULT nextval('bulk_imports_id_seq'::regclass); +ALTER TABLE ONLY requirements_management_test_reports + ADD CONSTRAINT requirements_management_test_reports_pkey PRIMARY KEY (id); -ALTER TABLE ONLY chat_names ALTER COLUMN id SET DEFAULT nextval('chat_names_id_seq'::regclass); +ALTER TABLE ONLY requirements + ADD CONSTRAINT requirements_pkey PRIMARY KEY (id); -ALTER TABLE ONLY chat_teams ALTER COLUMN id SET DEFAULT nextval('chat_teams_id_seq'::regclass); +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT resource_iteration_events_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY resource_label_events + ADD CONSTRAINT resource_label_events_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT resource_milestone_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_build_needs ALTER COLUMN id SET DEFAULT nextval('ci_build_needs_id_seq'::regclass); +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT resource_state_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_build_pending_states ALTER COLUMN id SET DEFAULT nextval('ci_build_pending_states_id_seq'::regclass); +ALTER TABLE ONLY resource_weight_events + ADD CONSTRAINT resource_weight_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_build_report_results ALTER COLUMN build_id SET DEFAULT nextval('ci_build_report_results_build_id_seq'::regclass); +ALTER TABLE ONLY reviews + ADD CONSTRAINT reviews_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_build_trace_chunks ALTER COLUMN id SET DEFAULT nextval('ci_build_trace_chunks_id_seq'::regclass); +ALTER TABLE ONLY routes + ADD CONSTRAINT routes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_builds ALTER COLUMN id SET DEFAULT nextval('ci_builds_id_seq'::regclass); +ALTER TABLE ONLY saml_group_links + ADD CONSTRAINT saml_group_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass); +ALTER TABLE ONLY saml_providers + ADD CONSTRAINT saml_providers_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_builds_runner_session ALTER COLUMN id SET DEFAULT nextval('ci_builds_runner_session_id_seq'::regclass); +ALTER TABLE ONLY saved_replies + ADD CONSTRAINT saved_replies_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('ci_daily_build_group_report_results_id_seq'::regclass); +ALTER TABLE ONLY scim_identities + ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_deleted_objects ALTER COLUMN id SET DEFAULT nextval('ci_deleted_objects_id_seq'::regclass); +ALTER TABLE ONLY scim_oauth_access_tokens + ADD CONSTRAINT scim_oauth_access_tokens_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_freeze_periods ALTER COLUMN id SET DEFAULT nextval('ci_freeze_periods_id_seq'::regclass); +ALTER TABLE ONLY security_findings + ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_group_variables ALTER COLUMN id SET DEFAULT nextval('ci_group_variables_id_seq'::regclass); +ALTER TABLE ONLY security_orchestration_policy_configurations + ADD CONSTRAINT security_orchestration_policy_configurations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_instance_variables ALTER COLUMN id SET DEFAULT nextval('ci_instance_variables_id_seq'::regclass); +ALTER TABLE ONLY security_orchestration_policy_rule_schedules + ADD CONSTRAINT security_orchestration_policy_rule_schedules_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_job_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_job_artifacts_id_seq'::regclass); +ALTER TABLE ONLY security_scans + ADD CONSTRAINT security_scans_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_job_token_project_scope_links ALTER COLUMN id SET DEFAULT nextval('ci_job_token_project_scope_links_id_seq'::regclass); +ALTER TABLE ONLY security_training_providers + ADD CONSTRAINT security_training_providers_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_job_variables ALTER COLUMN id SET DEFAULT nextval('ci_job_variables_id_seq'::regclass); +ALTER TABLE ONLY security_trainings + ADD CONSTRAINT security_trainings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_minutes_additional_packs ALTER COLUMN id SET DEFAULT nextval('ci_minutes_additional_packs_id_seq'::regclass); +ALTER TABLE ONLY self_managed_prometheus_alert_events + ADD CONSTRAINT self_managed_prometheus_alert_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_namespace_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_namespace_monthly_usages_id_seq'::regclass); +ALTER TABLE ONLY sent_notifications + ADD CONSTRAINT sent_notifications_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_pending_builds ALTER COLUMN id SET DEFAULT nextval('ci_pending_builds_id_seq'::regclass); +ALTER TABLE ONLY sentry_issues + ADD CONSTRAINT sentry_issues_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_pipeline_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_artifacts_id_seq'::regclass); +ALTER TABLE ONLY sprints + ADD CONSTRAINT sequence_is_unique_per_iterations_cadence_id UNIQUE (iterations_cadence_id, sequence) DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE ONLY ci_pipeline_chat_data ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_chat_data_id_seq'::regclass); +ALTER TABLE ONLY serverless_domain_cluster + ADD CONSTRAINT serverless_domain_cluster_pkey PRIMARY KEY (uuid); -ALTER TABLE ONLY ci_pipeline_messages ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_messages_id_seq'::regclass); +ALTER TABLE ONLY service_desk_settings + ADD CONSTRAINT service_desk_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY ci_pipeline_schedule_variables ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedule_variables_id_seq'::regclass); +ALTER TABLE ONLY shards + ADD CONSTRAINT shards_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_pipeline_schedules ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedules_id_seq'::regclass); +ALTER TABLE ONLY slack_integrations + ADD CONSTRAINT slack_integrations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_pipeline_variables ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_variables_id_seq'::regclass); +ALTER TABLE ONLY smartcard_identities + ADD CONSTRAINT smartcard_identities_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_pipelines_id_seq'::regclass); +ALTER TABLE ONLY snippet_repositories + ADD CONSTRAINT snippet_repositories_pkey PRIMARY KEY (snippet_id); -ALTER TABLE ONLY ci_pipelines_config ALTER COLUMN pipeline_id SET DEFAULT nextval('ci_pipelines_config_pipeline_id_seq'::regclass); +ALTER TABLE ONLY snippet_repository_storage_moves + ADD CONSTRAINT snippet_repository_storage_moves_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_platform_metrics ALTER COLUMN id SET DEFAULT nextval('ci_platform_metrics_id_seq'::regclass); +ALTER TABLE ONLY snippet_statistics + ADD CONSTRAINT snippet_statistics_pkey PRIMARY KEY (snippet_id); -ALTER TABLE ONLY ci_project_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_project_monthly_usages_id_seq'::regclass); +ALTER TABLE ONLY snippet_user_mentions + ADD CONSTRAINT snippet_user_mentions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_refs ALTER COLUMN id SET DEFAULT nextval('ci_refs_id_seq'::regclass); +ALTER TABLE ONLY snippets + ADD CONSTRAINT snippets_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_resource_groups ALTER COLUMN id SET DEFAULT nextval('ci_resource_groups_id_seq'::regclass); +ALTER TABLE ONLY software_license_policies + ADD CONSTRAINT software_license_policies_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_resources ALTER COLUMN id SET DEFAULT nextval('ci_resources_id_seq'::regclass); +ALTER TABLE ONLY software_licenses + ADD CONSTRAINT software_licenses_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_runner_namespaces ALTER COLUMN id SET DEFAULT nextval('ci_runner_namespaces_id_seq'::regclass); +ALTER TABLE ONLY spam_logs + ADD CONSTRAINT spam_logs_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_runner_projects ALTER COLUMN id SET DEFAULT nextval('ci_runner_projects_id_seq'::regclass); +ALTER TABLE ONLY sprints + ADD CONSTRAINT sprints_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_runners ALTER COLUMN id SET DEFAULT nextval('ci_runners_id_seq'::regclass); +ALTER TABLE ONLY status_check_responses + ADD CONSTRAINT status_check_responses_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_running_builds ALTER COLUMN id SET DEFAULT nextval('ci_running_builds_id_seq'::regclass); +ALTER TABLE ONLY status_page_published_incidents + ADD CONSTRAINT status_page_published_incidents_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_sources_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_sources_pipelines_id_seq'::regclass); +ALTER TABLE ONLY status_page_settings + ADD CONSTRAINT status_page_settings_pkey PRIMARY KEY (project_id); -ALTER TABLE ONLY ci_sources_projects ALTER COLUMN id SET DEFAULT nextval('ci_sources_projects_id_seq'::regclass); +ALTER TABLE ONLY subscriptions + ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_stages ALTER COLUMN id SET DEFAULT nextval('ci_stages_id_seq'::regclass); +ALTER TABLE ONLY suggestions + ADD CONSTRAINT suggestions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_subscriptions_projects ALTER COLUMN id SET DEFAULT nextval('ci_subscriptions_projects_id_seq'::regclass); +ALTER TABLE ONLY system_note_metadata + ADD CONSTRAINT system_note_metadata_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_trigger_requests ALTER COLUMN id SET DEFAULT nextval('ci_trigger_requests_id_seq'::regclass); +ALTER TABLE ONLY taggings + ADD CONSTRAINT taggings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_triggers ALTER COLUMN id SET DEFAULT nextval('ci_triggers_id_seq'::regclass); +ALTER TABLE ONLY tags + ADD CONSTRAINT tags_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_unit_test_failures ALTER COLUMN id SET DEFAULT nextval('ci_unit_test_failures_id_seq'::regclass); +ALTER TABLE ONLY term_agreements + ADD CONSTRAINT term_agreements_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_unit_tests ALTER COLUMN id SET DEFAULT nextval('ci_unit_tests_id_seq'::regclass); +ALTER TABLE ONLY terraform_state_versions + ADD CONSTRAINT terraform_state_versions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY ci_variables ALTER COLUMN id SET DEFAULT nextval('ci_variables_id_seq'::regclass); +ALTER TABLE ONLY terraform_states + ADD CONSTRAINT terraform_states_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_agent_tokens ALTER COLUMN id SET DEFAULT nextval('cluster_agent_tokens_id_seq'::regclass); +ALTER TABLE ONLY timelogs + ADD CONSTRAINT timelogs_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_agents ALTER COLUMN id SET DEFAULT nextval('cluster_agents_id_seq'::regclass); +ALTER TABLE ONLY todos + ADD CONSTRAINT todos_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_groups ALTER COLUMN id SET DEFAULT nextval('cluster_groups_id_seq'::regclass); +ALTER TABLE ONLY token_with_ivs + ADD CONSTRAINT token_with_ivs_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_platforms_kubernetes ALTER COLUMN id SET DEFAULT nextval('cluster_platforms_kubernetes_id_seq'::regclass); +ALTER TABLE ONLY topics + ADD CONSTRAINT topics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_projects ALTER COLUMN id SET DEFAULT nextval('cluster_projects_id_seq'::regclass); +ALTER TABLE ONLY trending_projects + ADD CONSTRAINT trending_projects_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_providers_aws ALTER COLUMN id SET DEFAULT nextval('cluster_providers_aws_id_seq'::regclass); +ALTER TABLE ONLY u2f_registrations + ADD CONSTRAINT u2f_registrations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY cluster_providers_gcp ALTER COLUMN id SET DEFAULT nextval('cluster_providers_gcp_id_seq'::regclass); +ALTER TABLE ONLY upcoming_reconciliations + ADD CONSTRAINT upcoming_reconciliations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq'::regclass); +ALTER TABLE ONLY upload_states + ADD CONSTRAINT upload_states_pkey PRIMARY KEY (upload_id); -ALTER TABLE ONLY clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cert_managers_id_seq'::regclass); +ALTER TABLE ONLY uploads + ADD CONSTRAINT uploads_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cilium_id_seq'::regclass); +ALTER TABLE ONLY user_agent_details + ADD CONSTRAINT user_agent_details_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('clusters_applications_crossplane_id_seq'::regclass); +ALTER TABLE ONLY user_callouts + ADD CONSTRAINT user_callouts_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass); +ALTER TABLE ONLY user_canonical_emails + ADD CONSTRAINT user_canonical_emails_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass); +ALTER TABLE ONLY user_credit_card_validations + ADD CONSTRAINT user_credit_card_validations_pkey PRIMARY KEY (user_id); -ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass); +ALTER TABLE ONLY user_custom_attributes + ADD CONSTRAINT user_custom_attributes_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_jupyter ALTER COLUMN id SET DEFAULT nextval('clusters_applications_jupyter_id_seq'::regclass); +ALTER TABLE ONLY user_details + ADD CONSTRAINT user_details_pkey PRIMARY KEY (user_id); -ALTER TABLE ONLY clusters_applications_knative ALTER COLUMN id SET DEFAULT nextval('clusters_applications_knative_id_seq'::regclass); +ALTER TABLE ONLY user_follow_users + ADD CONSTRAINT user_follow_users_pkey PRIMARY KEY (follower_id, followee_id); -ALTER TABLE ONLY clusters_applications_prometheus ALTER COLUMN id SET DEFAULT nextval('clusters_applications_prometheus_id_seq'::regclass); +ALTER TABLE ONLY user_group_callouts + ADD CONSTRAINT user_group_callouts_pkey PRIMARY KEY (id); -ALTER TABLE ONLY clusters_applications_runners ALTER COLUMN id SET DEFAULT nextval('clusters_applications_runners_id_seq'::regclass); +ALTER TABLE ONLY user_highest_roles + ADD CONSTRAINT user_highest_roles_pkey PRIMARY KEY (user_id); -ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER COLUMN id SET DEFAULT nextval('clusters_kubernetes_namespaces_id_seq'::regclass); +ALTER TABLE ONLY user_interacted_projects + ADD CONSTRAINT user_interacted_projects_pkey PRIMARY KEY (project_id, user_id); -ALTER TABLE ONLY commit_user_mentions ALTER COLUMN id SET DEFAULT nextval('commit_user_mentions_id_seq'::regclass); +ALTER TABLE ONLY user_permission_export_uploads + ADD CONSTRAINT user_permission_export_uploads_pkey PRIMARY KEY (id); -ALTER TABLE ONLY compliance_management_frameworks ALTER COLUMN id SET DEFAULT nextval('compliance_management_frameworks_id_seq'::regclass); +ALTER TABLE ONLY user_preferences + ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id); -ALTER TABLE ONLY container_repositories ALTER COLUMN id SET DEFAULT nextval('container_repositories_id_seq'::regclass); +ALTER TABLE ONLY user_statuses + ADD CONSTRAINT user_statuses_pkey PRIMARY KEY (user_id); -ALTER TABLE ONLY conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('conversational_development_index_metrics_id_seq'::regclass); +ALTER TABLE ONLY user_synced_attributes_metadata + ADD CONSTRAINT user_synced_attributes_metadata_pkey PRIMARY KEY (id); -ALTER TABLE ONLY csv_issue_imports ALTER COLUMN id SET DEFAULT nextval('csv_issue_imports_id_seq'::regclass); +ALTER TABLE ONLY users_ops_dashboard_projects + ADD CONSTRAINT users_ops_dashboard_projects_pkey PRIMARY KEY (id); -ALTER TABLE ONLY custom_emoji ALTER COLUMN id SET DEFAULT nextval('custom_emoji_id_seq'::regclass); +ALTER TABLE ONLY users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); -ALTER TABLE ONLY customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval('customer_relations_contacts_id_seq'::regclass); +ALTER TABLE ONLY users_security_dashboard_projects + ADD CONSTRAINT users_security_dashboard_projects_pkey PRIMARY KEY (project_id, user_id); -ALTER TABLE ONLY customer_relations_organizations ALTER COLUMN id SET DEFAULT nextval('customer_relations_organizations_id_seq'::regclass); +ALTER TABLE ONLY users_star_projects + ADD CONSTRAINT users_star_projects_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_profile_schedules ALTER COLUMN id SET DEFAULT nextval('dast_profile_schedules_id_seq'::regclass); +ALTER TABLE ONLY users_statistics + ADD CONSTRAINT users_statistics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_profiles ALTER COLUMN id SET DEFAULT nextval('dast_profiles_id_seq'::regclass); +ALTER TABLE ONLY vulnerabilities + ADD CONSTRAINT vulnerabilities_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_scanner_profiles ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_exports + ADD CONSTRAINT vulnerability_exports_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_site_profile_secret_variables ALTER COLUMN id SET DEFAULT nextval('dast_site_profile_secret_variables_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_external_issue_links + ADD CONSTRAINT vulnerability_external_issue_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('dast_site_profiles_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_feedback + ADD CONSTRAINT vulnerability_feedback_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_site_tokens ALTER COLUMN id SET DEFAULT nextval('dast_site_tokens_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_finding_evidences + ADD CONSTRAINT vulnerability_finding_evidences_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast_site_validations_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_finding_links + ADD CONSTRAINT vulnerability_finding_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_finding_signatures + ADD CONSTRAINT vulnerability_finding_signatures_pkey PRIMARY KEY (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 vulnerability_findings_remediations + ADD CONSTRAINT vulnerability_findings_remediations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_flags + ADD CONSTRAINT vulnerability_flags_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_historical_statistics + ADD CONSTRAINT vulnerability_historical_statistics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dependency_proxy_manifests ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_manifests_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_identifiers + ADD CONSTRAINT vulnerability_identifiers_pkey PRIMARY KEY (id); -ALTER TABLE ONLY deploy_keys_projects ALTER COLUMN id SET DEFAULT nextval('deploy_keys_projects_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_issue_links + ADD CONSTRAINT vulnerability_issue_links_pkey PRIMARY KEY (id); -ALTER TABLE ONLY deploy_tokens ALTER COLUMN id SET DEFAULT nextval('deploy_tokens_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_occurrence_identifiers + ADD CONSTRAINT vulnerability_occurrence_identifiers_pkey PRIMARY KEY (id); -ALTER TABLE ONLY deployments ALTER COLUMN id SET DEFAULT nextval('deployments_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_occurrence_pipelines + ADD CONSTRAINT vulnerability_occurrence_pipelines_pkey PRIMARY KEY (id); -ALTER TABLE ONLY description_versions ALTER COLUMN id SET DEFAULT nextval('description_versions_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_occurrences + ADD CONSTRAINT vulnerability_occurrences_pkey PRIMARY KEY (id); -ALTER TABLE ONLY design_management_designs ALTER COLUMN id SET DEFAULT nextval('design_management_designs_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_reads + ADD CONSTRAINT vulnerability_reads_pkey PRIMARY KEY (id); -ALTER TABLE ONLY design_management_designs_versions ALTER COLUMN id SET DEFAULT nextval('design_management_designs_versions_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_remediations + ADD CONSTRAINT vulnerability_remediations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY design_management_versions ALTER COLUMN id SET DEFAULT nextval('design_management_versions_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_scanners + ADD CONSTRAINT vulnerability_scanners_pkey PRIMARY KEY (id); -ALTER TABLE ONLY design_user_mentions ALTER COLUMN id SET DEFAULT nextval('design_user_mentions_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_statistics + ADD CONSTRAINT vulnerability_statistics_pkey PRIMARY KEY (id); -ALTER TABLE ONLY detached_partitions ALTER COLUMN id SET DEFAULT nextval('detached_partitions_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_user_mentions + ADD CONSTRAINT vulnerability_user_mentions_pkey PRIMARY KEY (id); -ALTER TABLE ONLY diff_note_positions ALTER COLUMN id SET DEFAULT nextval('diff_note_positions_id_seq'::regclass); +ALTER TABLE ONLY web_hooks + ADD CONSTRAINT web_hooks_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dora_daily_metrics ALTER COLUMN id SET DEFAULT nextval('dora_daily_metrics_id_seq'::regclass); +ALTER TABLE ONLY webauthn_registrations + ADD CONSTRAINT webauthn_registrations_pkey PRIMARY KEY (id); -ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass); +ALTER TABLE ONLY wiki_page_meta + ADD CONSTRAINT wiki_page_meta_pkey PRIMARY KEY (id); -ALTER TABLE ONLY elastic_index_settings ALTER COLUMN id SET DEFAULT nextval('elastic_index_settings_id_seq'::regclass); +ALTER TABLE ONLY wiki_page_slugs + ADD CONSTRAINT wiki_page_slugs_pkey PRIMARY KEY (id); -ALTER TABLE ONLY elastic_reindexing_slices ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_slices_id_seq'::regclass); +ALTER TABLE ONLY work_item_types + ADD CONSTRAINT work_item_types_pkey PRIMARY KEY (id); -ALTER TABLE ONLY elastic_reindexing_subtasks ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_subtasks_id_seq'::regclass); +ALTER TABLE ONLY x509_certificates + ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id); -ALTER TABLE ONLY elastic_reindexing_tasks ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_tasks_id_seq'::regclass); +ALTER TABLE ONLY x509_commit_signatures + ADD CONSTRAINT x509_commit_signatures_pkey PRIMARY KEY (id); -ALTER TABLE ONLY emails ALTER COLUMN id SET DEFAULT nextval('emails_id_seq'::regclass); +ALTER TABLE ONLY x509_issuers + ADD CONSTRAINT x509_issuers_pkey PRIMARY KEY (id); -ALTER TABLE ONLY environments ALTER COLUMN id SET DEFAULT nextval('environments_id_seq'::regclass); +ALTER TABLE ONLY zentao_tracker_data + ADD CONSTRAINT zentao_tracker_data_pkey PRIMARY KEY (id); -ALTER TABLE ONLY epic_issues ALTER COLUMN id SET DEFAULT nextval('epic_issues_id_seq'::regclass); +ALTER TABLE ONLY zoom_meetings + ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); -ALTER TABLE ONLY epic_metrics ALTER COLUMN id SET DEFAULT nextval('epic_metrics_id_seq'::regclass); +CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id); -ALTER TABLE ONLY epic_user_mentions ALTER COLUMN id SET DEFAULT nextval('epic_user_mentions_id_seq'::regclass); +CREATE INDEX audit_events_000000_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (created_at, author_id); -ALTER TABLE ONLY epics ALTER COLUMN id SET DEFAULT nextval('epics_id_seq'::regclass); +CREATE INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ON ONLY audit_events USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY error_tracking_client_keys ALTER COLUMN id SET DEFAULT nextval('error_tracking_client_keys_id_seq'::regclass); +CREATE INDEX audit_events_000000_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY error_tracking_error_events ALTER COLUMN id SET DEFAULT nextval('error_tracking_error_events_id_seq'::regclass); +CREATE INDEX audit_events_202212_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202212 USING btree (created_at, author_id); -ALTER TABLE ONLY error_tracking_errors ALTER COLUMN id SET DEFAULT nextval('error_tracking_errors_id_seq'::regclass); +CREATE INDEX audit_events_202212_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202212 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::regclass); +CREATE INDEX audit_events_202301_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202301 USING btree (created_at, author_id); -ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq'::regclass); +CREATE INDEX audit_events_202301_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202301 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass); +CREATE INDEX audit_events_202302_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202302 USING btree (created_at, author_id); -ALTER TABLE ONLY experiment_users ALTER COLUMN id SET DEFAULT nextval('experiment_users_id_seq'::regclass); +CREATE INDEX audit_events_202302_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202302 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY experiments ALTER COLUMN id SET DEFAULT nextval('experiments_id_seq'::regclass); +CREATE INDEX audit_events_202303_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202303 USING btree (created_at, author_id); -ALTER TABLE ONLY external_approval_rules ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_id_seq'::regclass); +CREATE INDEX audit_events_202303_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202303 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY external_approval_rules_protected_branches ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_protected_branches_id_seq'::regclass); +CREATE INDEX audit_events_202304_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202304 USING btree (created_at, author_id); -ALTER TABLE ONLY external_pull_requests ALTER COLUMN id SET DEFAULT nextval('external_pull_requests_id_seq'::regclass); +CREATE INDEX audit_events_202304_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202304 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY external_status_checks ALTER COLUMN id SET DEFAULT nextval('external_status_checks_id_seq'::regclass); +CREATE INDEX audit_events_202305_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (created_at, author_id); -ALTER TABLE ONLY external_status_checks_protected_branches ALTER COLUMN id SET DEFAULT nextval('external_status_checks_protected_branches_id_seq'::regclass); +CREATE INDEX audit_events_202305_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY feature_gates ALTER COLUMN id SET DEFAULT nextval('feature_gates_id_seq'::regclass); +CREATE INDEX audit_events_202306_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (created_at, author_id); -ALTER TABLE ONLY features ALTER COLUMN id SET DEFAULT nextval('features_id_seq'::regclass); +CREATE INDEX audit_events_202306_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (entity_id, entity_type, id DESC, author_id, created_at); -ALTER TABLE ONLY fork_network_members ALTER COLUMN id SET DEFAULT nextval('fork_network_members_id_seq'::regclass); +CREATE INDEX audit_events_202307_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202307 USING btree (created_at, author_id); -ALTER TABLE ONLY fork_networks ALTER COLUMN id SET DEFAULT nextval('fork_networks_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_cache_invalidation_events ALTER COLUMN id SET DEFAULT nextval('geo_cache_invalidation_events_id_seq'::regclass); +CREATE INDEX audit_events_202308_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202308 USING btree (created_at, author_id); -ALTER TABLE ONLY geo_container_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_container_repository_updated_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_event_log ALTER COLUMN id SET DEFAULT nextval('geo_event_log_id_seq'::regclass); +CREATE INDEX audit_events_202309_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202309 USING btree (created_at, author_id); -ALTER TABLE ONLY geo_events ALTER COLUMN id SET DEFAULT nextval('geo_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_hashed_storage_attachments_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_attachments_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_hashed_storage_migrated_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_migrated_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_job_artifact_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_job_artifact_deleted_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_lfs_object_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_lfs_object_deleted_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_node_namespace_links ALTER COLUMN id SET DEFAULT nextval('geo_node_namespace_links_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_node_statuses ALTER COLUMN id SET DEFAULT nextval('geo_node_statuses_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_nodes ALTER COLUMN id SET DEFAULT nextval('geo_nodes_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_repositories_changed_events ALTER COLUMN id SET DEFAULT nextval('geo_repositories_changed_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_repository_created_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_created_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_repository_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_deleted_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_repository_renamed_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_renamed_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_repository_updated_events_id_seq'::regclass); +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); -ALTER TABLE ONLY geo_reset_checksum_events ALTER COLUMN id SET DEFAULT nextval('geo_reset_checksum_events_id_seq'::regclass); +CREATE INDEX index_incident_management_pending_alert_escalations_on_rule_id ON ONLY incident_management_pending_alert_escalations USING btree (rule_id); -ALTER TABLE ONLY geo_upload_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_upload_deleted_events_id_seq'::regclass); +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); -ALTER TABLE ONLY gitlab_subscription_histories ALTER COLUMN id SET DEFAULT nextval('gitlab_subscription_histories_id_seq'::regclass); +CREATE INDEX index_incident_management_pending_alert_escalations_on_alert_id ON ONLY incident_management_pending_alert_escalations USING btree (alert_id); -ALTER TABLE ONLY gitlab_subscriptions ALTER COLUMN id SET DEFAULT nextval('gitlab_subscriptions_id_seq'::regclass); +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); -ALTER TABLE ONLY gpg_key_subkeys ALTER COLUMN id SET DEFAULT nextval('gpg_key_subkeys_id_seq'::regclass); +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); -ALTER TABLE ONLY gpg_keys ALTER COLUMN id SET DEFAULT nextval('gpg_keys_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 USING btree (rule_id); -ALTER TABLE ONLY gpg_signatures ALTER COLUMN id SET DEFAULT nextval('gpg_signatures_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 USING btree (rule_id); -ALTER TABLE ONLY grafana_integrations ALTER COLUMN id SET DEFAULT nextval('grafana_integrations_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (rule_id); -ALTER TABLE ONLY group_custom_attributes ALTER COLUMN id SET DEFAULT nextval('group_custom_attributes_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (rule_id); -ALTER TABLE ONLY group_deploy_keys ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_id_seq'::regclass); +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); -ALTER TABLE ONLY group_deploy_keys_groups ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_groups_id_seq'::regclass); +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); -ALTER TABLE ONLY group_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('group_deploy_tokens_id_seq'::regclass); +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); -ALTER TABLE ONLY group_group_links ALTER COLUMN id SET DEFAULT nextval('group_group_links_id_seq'::regclass); +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); -ALTER TABLE ONLY group_import_states ALTER COLUMN group_id SET DEFAULT nextval('group_import_states_group_id_seq'::regclass); +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); -ALTER TABLE ONLY group_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('group_repository_storage_moves_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 USING btree (alert_id); -ALTER TABLE ONLY historical_data ALTER COLUMN id SET DEFAULT nextval('historical_data_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 USING btree (alert_id); -ALTER TABLE ONLY identities ALTER COLUMN id SET DEFAULT nextval('identities_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (alert_id); -ALTER TABLE ONLY import_export_uploads ALTER COLUMN id SET DEFAULT nextval('import_export_uploads_id_seq'::regclass); +CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (alert_id); -ALTER TABLE ONLY import_failures ALTER COLUMN id SET DEFAULT nextval('import_failures_id_seq'::regclass); +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); -ALTER TABLE ONLY in_product_marketing_emails ALTER COLUMN id SET DEFAULT nextval('in_product_marketing_emails_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_escalation_policies ALTER COLUMN id SET DEFAULT nextval('incident_management_escalation_policies_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_escalation_rules ALTER COLUMN id SET DEFAULT nextval('incident_management_escalation_rules_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_issuable_escalation_statuses ALTER COLUMN id SET DEFAULT nextval('incident_management_issuable_escalation_statuses_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_oncall_participants ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_participants_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_oncall_rotations ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_rotations_id_seq'::regclass); +CREATE INDEX index_incident_management_pending_issue_escalations_on_rule_id ON ONLY incident_management_pending_issue_escalations USING btree (rule_id); -ALTER TABLE ONLY incident_management_oncall_schedules ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_schedules_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_oncall_shifts ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_shifts_id_seq'::regclass); +CREATE INDEX index_incident_management_pending_issue_escalations_on_issue_id ON ONLY incident_management_pending_issue_escalations USING btree (issue_id); -ALTER TABLE ONLY incident_management_pending_alert_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass); +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); -ALTER TABLE ONLY incident_management_pending_issue_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass); +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); -ALTER TABLE ONLY index_statuses ALTER COLUMN id SET DEFAULT nextval('index_statuses_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 USING btree (rule_id); -ALTER TABLE ONLY insights ALTER COLUMN id SET DEFAULT nextval('insights_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 USING btree (rule_id); -ALTER TABLE ONLY integrations ALTER COLUMN id SET DEFAULT nextval('integrations_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (rule_id); -ALTER TABLE ONLY internal_ids ALTER COLUMN id SET DEFAULT nextval('internal_ids_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (rule_id); -ALTER TABLE ONLY ip_restrictions ALTER COLUMN id SET DEFAULT nextval('ip_restrictions_id_seq'::regclass); +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); -ALTER TABLE ONLY issuable_metric_images ALTER COLUMN id SET DEFAULT nextval('issuable_metric_images_id_seq'::regclass); +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); -ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuable_severities_id_seq'::regclass); +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); -ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass); +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); -ALTER TABLE ONLY issue_email_participants ALTER COLUMN id SET DEFAULT nextval('issue_email_participants_id_seq'::regclass); +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); -ALTER TABLE ONLY issue_links ALTER COLUMN id SET DEFAULT nextval('issue_links_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 USING btree (issue_id); -ALTER TABLE ONLY issue_metrics ALTER COLUMN id SET DEFAULT nextval('issue_metrics_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 USING btree (issue_id); -ALTER TABLE ONLY issue_tracker_data ALTER COLUMN id SET DEFAULT nextval('issue_tracker_data_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (issue_id); -ALTER TABLE ONLY issue_user_mentions ALTER COLUMN id SET DEFAULT nextval('issue_user_mentions_id_seq'::regclass); +CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (issue_id); -ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass); +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); -ALTER TABLE ONLY iterations_cadences ALTER COLUMN id SET DEFAULT nextval('iterations_cadences_id_seq'::regclass); +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); -ALTER TABLE ONLY jira_connect_installations ALTER COLUMN id SET DEFAULT nextval('jira_connect_installations_id_seq'::regclass); +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); -ALTER TABLE ONLY jira_connect_subscriptions ALTER COLUMN id SET DEFAULT nextval('jira_connect_subscriptions_id_seq'::regclass); +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); -ALTER TABLE ONLY jira_imports ALTER COLUMN id SET DEFAULT nextval('jira_imports_id_seq'::regclass); +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); -ALTER TABLE ONLY jira_tracker_data ALTER COLUMN id SET DEFAULT nextval('jira_tracker_data_id_seq'::regclass); +CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs USING btree (web_hook_id); -ALTER TABLE ONLY keys ALTER COLUMN id SET DEFAULT nextval('keys_id_seq'::regclass); +CREATE INDEX index_1554dc6f11 ON gitlab_partitions_dynamic.web_hook_logs_202301 USING btree (web_hook_id); -ALTER TABLE ONLY label_links ALTER COLUMN id SET DEFAULT nextval('label_links_id_seq'::regclass); +CREATE INDEX index_719c6187cb ON gitlab_partitions_dynamic.web_hook_logs_202212 USING btree (web_hook_id); -ALTER TABLE ONLY label_priorities ALTER COLUMN id SET DEFAULT nextval('label_priorities_id_seq'::regclass); +CREATE INDEX index_80bf138a51 ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (web_hook_id); -ALTER TABLE ONLY labels ALTER COLUMN id SET DEFAULT nextval('labels_id_seq'::regclass); +CREATE INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ON ONLY web_hook_logs USING btree (created_at, web_hook_id); -ALTER TABLE ONLY ldap_group_links ALTER COLUMN id SET DEFAULT nextval('ldap_group_links_id_seq'::regclass); +CREATE INDEX index_962081978f ON gitlab_partitions_dynamic.web_hook_logs_202212 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY lfs_file_locks ALTER COLUMN id SET DEFAULT nextval('lfs_file_locks_id_seq'::regclass); +CREATE INDEX index_eecfac613f ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY lfs_objects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_id_seq'::regclass); +CREATE INDEX index_fdb8d5eeea ON gitlab_partitions_dynamic.web_hook_logs_202301 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY lfs_objects_projects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_projects_id_seq'::regclass); +CREATE UNIQUE INDEX index_verification_codes_on_phone_and_visitor_id_code ON ONLY verification_codes USING btree (visitor_id_code, phone, created_at); -ALTER TABLE ONLY licenses ALTER COLUMN id SET DEFAULT nextval('licenses_id_seq'::regclass); +COMMENT ON INDEX index_verification_codes_on_phone_and_visitor_id_code IS 'JiHu-specific index'; -ALTER TABLE ONLY list_user_preferences ALTER COLUMN id SET DEFAULT nextval('list_user_preferences_id_seq'::regclass); +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); -ALTER TABLE ONLY lists ALTER COLUMN id SET DEFAULT nextval('lists_id_seq'::regclass); +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); -ALTER TABLE ONLY members ALTER COLUMN id SET DEFAULT nextval('members_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('merge_request_assignees_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_blocks ALTER COLUMN id SET DEFAULT nextval('merge_request_blocks_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_cleanup_schedules ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_cleanup_schedules_merge_request_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_context_commits ALTER COLUMN id SET DEFAULT nextval('merge_request_context_commits_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_diff_commit_users ALTER COLUMN id SET DEFAULT nextval('merge_request_diff_commit_users_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_diff_details ALTER COLUMN merge_request_diff_id SET DEFAULT nextval('merge_request_diff_details_merge_request_diff_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_diffs ALTER COLUMN id SET DEFAULT nextval('merge_request_diffs_id_seq'::regclass); +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); -ALTER TABLE ONLY merge_request_metrics ALTER COLUMN id SET DEFAULT nextval('merge_request_metrics_id_seq'::regclass); +CREATE INDEX web_hook_logs_202302_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202302 USING btree (web_hook_id); -ALTER TABLE ONLY merge_request_reviewers ALTER COLUMN id SET DEFAULT nextval('merge_request_reviewers_id_seq'::regclass); +CREATE INDEX web_hook_logs_202303_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202303 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY merge_request_user_mentions ALTER COLUMN id SET DEFAULT nextval('merge_request_user_mentions_id_seq'::regclass); +CREATE INDEX web_hook_logs_202303_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202303 USING btree (web_hook_id); -ALTER TABLE ONLY merge_requests ALTER COLUMN id SET DEFAULT nextval('merge_requests_id_seq'::regclass); +CREATE INDEX web_hook_logs_202304_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202304 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY merge_requests_closing_issues ALTER COLUMN id SET DEFAULT nextval('merge_requests_closing_issues_id_seq'::regclass); +CREATE INDEX web_hook_logs_202304_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202304 USING btree (web_hook_id); -ALTER TABLE ONLY merge_trains ALTER COLUMN id SET DEFAULT nextval('merge_trains_id_seq'::regclass); +CREATE INDEX web_hook_logs_202305_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY metrics_dashboard_annotations ALTER COLUMN id SET DEFAULT nextval('metrics_dashboard_annotations_id_seq'::regclass); +CREATE INDEX web_hook_logs_202305_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (web_hook_id); -ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT nextval('metrics_users_starred_dashboards_id_seq'::regclass); +CREATE INDEX web_hook_logs_202306_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass); +CREATE INDEX web_hook_logs_202306_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (web_hook_id); -ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('namespace_admin_notes_id_seq'::regclass); +CREATE INDEX web_hook_logs_202307_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (created_at, web_hook_id); -ALTER TABLE ONLY namespace_aggregation_schedules ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_aggregation_schedules_namespace_id_seq'::regclass); +CREATE INDEX web_hook_logs_202307_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (web_hook_id); -ALTER TABLE ONLY namespace_root_storage_statistics ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_root_storage_statistics_namespace_id_seq'::regclass); +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); -ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass); +CREATE INDEX web_hook_logs_202308_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202308 USING btree (web_hook_id); -ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass); +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); -ALTER TABLE ONLY note_diff_files ALTER COLUMN id SET DEFAULT nextval('note_diff_files_id_seq'::regclass); +CREATE INDEX web_hook_logs_202309_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202309 USING btree (web_hook_id); -ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass); +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); -ALTER TABLE ONLY notification_settings ALTER COLUMN id SET DEFAULT nextval('notification_settings_id_seq'::regclass); +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); -ALTER TABLE ONLY oauth_access_grants ALTER COLUMN id SET DEFAULT nextval('oauth_access_grants_id_seq'::regclass); +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); -ALTER TABLE ONLY oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_access_tokens_id_seq'::regclass); +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); -ALTER TABLE ONLY oauth_applications ALTER COLUMN id SET DEFAULT nextval('oauth_applications_id_seq'::regclass); +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); -ALTER TABLE ONLY oauth_openid_requests ALTER COLUMN id SET DEFAULT nextval('oauth_openid_requests_id_seq'::regclass); +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); -ALTER TABLE ONLY onboarding_progresses ALTER COLUMN id SET DEFAULT nextval('onboarding_progresses_id_seq'::regclass); +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); -ALTER TABLE ONLY open_project_tracker_data ALTER COLUMN id SET DEFAULT nextval('open_project_tracker_data_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_feature_flag_scopes ALTER COLUMN id SET DEFAULT nextval('operations_feature_flag_scopes_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_feature_flags ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_feature_flags_clients ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_clients_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_feature_flags_issues ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_issues_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_scopes ALTER COLUMN id SET DEFAULT nextval('operations_scopes_id_seq'::regclass); +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); -ALTER TABLE ONLY operations_strategies ALTER COLUMN id SET DEFAULT nextval('operations_strategies_id_seq'::regclass); +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)); -ALTER TABLE ONLY operations_strategies_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_strategies_user_lists_id_seq'::regclass); +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)); -ALTER TABLE ONLY operations_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_user_lists_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_build_infos_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_composer_cache_files ALTER COLUMN id SET DEFAULT nextval('packages_composer_cache_files_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_conan_file_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_file_metadata_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_conan_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_metadata_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_group_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_architectures_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_group_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_component_files_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_group_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_components_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_debian_group_distribution_keys ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_distribution_keys_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_group_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_distributions_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_project_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_architectures_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_project_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_component_files_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_debian_project_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_components_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_debian_project_distribution_keys ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_distribution_keys_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_debian_project_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_distributions_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_debian_publications ALTER COLUMN id SET DEFAULT nextval('packages_debian_publications_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_dependencies ALTER COLUMN id SET DEFAULT nextval('packages_dependencies_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_dependency_links ALTER COLUMN id SET DEFAULT nextval('packages_dependency_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_events ALTER COLUMN id SET DEFAULT nextval('packages_events_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_maven_metadata ALTER COLUMN id SET DEFAULT nextval('packages_maven_metadata_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_package_file_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_package_file_build_infos_id_seq'::regclass); +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)); -ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('packages_package_files_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages_packages_id_seq'::regclass); +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); -ALTER TABLE ONLY packages_tags ALTER COLUMN id SET DEFAULT nextval('packages_tags_id_seq'::regclass); +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); -ALTER TABLE ONLY pages_deployments ALTER COLUMN id SET DEFAULT nextval('pages_deployments_id_seq'::regclass); +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); -ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('pages_domain_acme_orders_id_seq'::regclass); +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); -ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass); +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); -ALTER TABLE ONLY partitioned_foreign_keys ALTER COLUMN id SET DEFAULT nextval('partitioned_foreign_keys_id_seq'::regclass); +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); -ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass); +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)); -ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass); +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); -ALTER TABLE ONLY plan_limits ALTER COLUMN id SET DEFAULT nextval('plan_limits_id_seq'::regclass); +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)); -ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regclass); +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)); -ALTER TABLE ONLY pool_repositories ALTER COLUMN id SET DEFAULT nextval('pool_repositories_id_seq'::regclass); +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)); -ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('postgres_async_indexes_id_seq'::regclass); +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); -ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass); +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); -ALTER TABLE ONLY product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass); +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); -ALTER TABLE ONLY programming_languages ALTER COLUMN id SET DEFAULT nextval('programming_languages_id_seq'::regclass); +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); -ALTER TABLE ONLY project_aliases ALTER COLUMN id SET DEFAULT nextval('project_aliases_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_auto_devops ALTER COLUMN id SET DEFAULT nextval('project_auto_devops_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_ci_cd_settings ALTER COLUMN id SET DEFAULT nextval('project_ci_cd_settings_id_seq'::regclass); +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); -ALTER TABLE ONLY project_ci_feature_usages ALTER COLUMN id SET DEFAULT nextval('project_ci_feature_usages_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_compliance_framework_settings ALTER COLUMN project_id SET DEFAULT nextval('project_compliance_framework_settings_project_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_custom_attributes ALTER COLUMN id SET DEFAULT nextval('project_custom_attributes_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_daily_statistics ALTER COLUMN id SET DEFAULT nextval('project_daily_statistics_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('project_deploy_tokens_id_seq'::regclass); +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); -ALTER TABLE ONLY project_export_jobs ALTER COLUMN id SET DEFAULT nextval('project_export_jobs_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_features ALTER COLUMN id SET DEFAULT nextval('project_features_id_seq'::regclass); +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); -ALTER TABLE ONLY project_group_links ALTER COLUMN id SET DEFAULT nextval('project_group_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_import_data ALTER COLUMN id SET DEFAULT nextval('project_import_data_id_seq'::regclass); +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); -ALTER TABLE ONLY project_mirror_data ALTER COLUMN id SET DEFAULT nextval('project_mirror_data_id_seq'::regclass); +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); -ALTER TABLE ONLY project_repositories ALTER COLUMN id SET DEFAULT nextval('project_repositories_id_seq'::regclass); +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); -ALTER TABLE ONLY project_repository_states ALTER COLUMN id SET DEFAULT nextval('project_repository_states_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('project_repository_storage_moves_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_security_settings ALTER COLUMN project_id SET DEFAULT nextval('project_security_settings_project_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_statistics ALTER COLUMN id SET DEFAULT nextval('project_statistics_id_seq'::regclass); +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)); -ALTER TABLE ONLY project_topics ALTER COLUMN id SET DEFAULT nextval('project_topics_id_seq'::regclass); +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); -ALTER TABLE ONLY project_tracing_settings ALTER COLUMN id SET DEFAULT nextval('project_tracing_settings_id_seq'::regclass); +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); -ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass); +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); -ALTER TABLE ONLY prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('prometheus_alert_events_id_seq'::regclass); +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); -ALTER TABLE ONLY prometheus_alerts ALTER COLUMN id SET DEFAULT nextval('prometheus_alerts_id_seq'::regclass); +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); -ALTER TABLE ONLY prometheus_metrics ALTER COLUMN id SET DEFAULT nextval('prometheus_metrics_id_seq'::regclass); +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)); -ALTER TABLE ONLY protected_branch_merge_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_merge_access_levels_id_seq'::regclass); +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); -ALTER TABLE ONLY protected_branch_push_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_push_access_levels_id_seq'::regclass); +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)); -ALTER TABLE ONLY protected_branch_unprotect_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_branch_unprotect_access_levels_id_seq'::regclass); +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); -ALTER TABLE ONLY protected_branches ALTER COLUMN id SET DEFAULT nextval('protected_branches_id_seq'::regclass); +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)); -ALTER TABLE ONLY protected_environment_deploy_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_environment_deploy_access_levels_id_seq'::regclass); +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)); -ALTER TABLE ONLY protected_environments ALTER COLUMN id SET DEFAULT nextval('protected_environments_id_seq'::regclass); +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); -ALTER TABLE ONLY protected_tag_create_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_tag_create_access_levels_id_seq'::regclass); +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)); -ALTER TABLE ONLY protected_tags ALTER COLUMN id SET DEFAULT nextval('protected_tags_id_seq'::regclass); +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)); -ALTER TABLE ONLY push_rules ALTER COLUMN id SET DEFAULT nextval('push_rules_id_seq'::regclass); +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)); -ALTER TABLE ONLY raw_usage_data ALTER COLUMN id SET DEFAULT nextval('raw_usage_data_id_seq'::regclass); +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); -ALTER TABLE ONLY redirect_routes ALTER COLUMN id SET DEFAULT nextval('redirect_routes_id_seq'::regclass); +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); -ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq'::regclass); +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); -ALTER TABLE ONLY remote_mirrors ALTER COLUMN id SET DEFAULT nextval('remote_mirrors_id_seq'::regclass); +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); -ALTER TABLE ONLY required_code_owners_sections ALTER COLUMN id SET DEFAULT nextval('required_code_owners_sections_id_seq'::regclass); +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); -ALTER TABLE ONLY requirements ALTER COLUMN id SET DEFAULT nextval('requirements_id_seq'::regclass); +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); -ALTER TABLE ONLY requirements_management_test_reports ALTER COLUMN id SET DEFAULT nextval('requirements_management_test_reports_id_seq'::regclass); +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)); -ALTER TABLE ONLY resource_iteration_events ALTER COLUMN id SET DEFAULT nextval('resource_iteration_events_id_seq'::regclass); +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)); -ALTER TABLE ONLY resource_label_events ALTER COLUMN id SET DEFAULT nextval('resource_label_events_id_seq'::regclass); +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)); -ALTER TABLE ONLY resource_milestone_events ALTER COLUMN id SET DEFAULT nextval('resource_milestone_events_id_seq'::regclass); +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); -ALTER TABLE ONLY resource_state_events ALTER COLUMN id SET DEFAULT nextval('resource_state_events_id_seq'::regclass); +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)); -ALTER TABLE ONLY resource_weight_events ALTER COLUMN id SET DEFAULT nextval('resource_weight_events_id_seq'::regclass); +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)); -ALTER TABLE ONLY reviews ALTER COLUMN id SET DEFAULT nextval('reviews_id_seq'::regclass); +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); -ALTER TABLE ONLY routes ALTER COLUMN id SET DEFAULT nextval('routes_id_seq'::regclass); +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); -ALTER TABLE ONLY saml_group_links ALTER COLUMN id SET DEFAULT nextval('saml_group_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_providers_id_seq'::regclass); +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); -ALTER TABLE ONLY scim_identities ALTER COLUMN id SET DEFAULT nextval('scim_identities_id_seq'::regclass); +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); -ALTER TABLE ONLY scim_oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('scim_oauth_access_tokens_id_seq'::regclass); +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)); -ALTER TABLE ONLY security_findings ALTER COLUMN id SET DEFAULT nextval('security_findings_id_seq'::regclass); +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); -ALTER TABLE ONLY security_orchestration_policy_configurations ALTER COLUMN id SET DEFAULT nextval('security_orchestration_policy_configurations_id_seq'::regclass); +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)); -ALTER TABLE ONLY security_orchestration_policy_rule_schedules ALTER COLUMN id SET DEFAULT nextval('security_orchestration_policy_rule_schedules_id_seq'::regclass); +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)); -ALTER TABLE ONLY security_scans ALTER COLUMN id SET DEFAULT nextval('security_scans_id_seq'::regclass); +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); -ALTER TABLE ONLY self_managed_prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('self_managed_prometheus_alert_events_id_seq'::regclass); +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); -ALTER TABLE ONLY sent_notifications ALTER COLUMN id SET DEFAULT nextval('sent_notifications_id_seq'::regclass); +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)); -ALTER TABLE ONLY sentry_issues ALTER COLUMN id SET DEFAULT nextval('sentry_issues_id_seq'::regclass); +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); -ALTER TABLE ONLY shards ALTER COLUMN id SET DEFAULT nextval('shards_id_seq'::regclass); +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)); -ALTER TABLE ONLY slack_integrations ALTER COLUMN id SET DEFAULT nextval('slack_integrations_id_seq'::regclass); +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)); -ALTER TABLE ONLY smartcard_identities ALTER COLUMN id SET DEFAULT nextval('smartcard_identities_id_seq'::regclass); +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)); -ALTER TABLE ONLY snippet_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('snippet_repository_storage_moves_id_seq'::regclass); +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); -ALTER TABLE ONLY snippet_user_mentions ALTER COLUMN id SET DEFAULT nextval('snippet_user_mentions_id_seq'::regclass); +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); -ALTER TABLE ONLY snippets ALTER COLUMN id SET DEFAULT nextval('snippets_id_seq'::regclass); +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)); -ALTER TABLE ONLY software_license_policies ALTER COLUMN id SET DEFAULT nextval('software_license_policies_id_seq'::regclass); +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); -ALTER TABLE ONLY software_licenses ALTER COLUMN id SET DEFAULT nextval('software_licenses_id_seq'::regclass); +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); -ALTER TABLE ONLY spam_logs ALTER COLUMN id SET DEFAULT nextval('spam_logs_id_seq'::regclass); +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)); -ALTER TABLE ONLY sprints ALTER COLUMN id SET DEFAULT nextval('sprints_id_seq'::regclass); +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); -ALTER TABLE ONLY status_check_responses ALTER COLUMN id SET DEFAULT nextval('status_check_responses_id_seq'::regclass); +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); -ALTER TABLE ONLY status_page_published_incidents ALTER COLUMN id SET DEFAULT nextval('status_page_published_incidents_id_seq'::regclass); +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)); -ALTER TABLE ONLY status_page_settings ALTER COLUMN project_id SET DEFAULT nextval('status_page_settings_project_id_seq'::regclass); +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); -ALTER TABLE ONLY subscriptions ALTER COLUMN id SET DEFAULT nextval('subscriptions_id_seq'::regclass); +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)); -ALTER TABLE ONLY suggestions ALTER COLUMN id SET DEFAULT nextval('suggestions_id_seq'::regclass); +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); -ALTER TABLE ONLY system_note_metadata ALTER COLUMN id SET DEFAULT nextval('system_note_metadata_id_seq'::regclass); +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)); -ALTER TABLE ONLY taggings ALTER COLUMN id SET DEFAULT nextval('taggings_id_seq'::regclass); +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)); -ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); +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); -ALTER TABLE ONLY term_agreements ALTER COLUMN id SET DEFAULT nextval('term_agreements_id_seq'::regclass); +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)); -ALTER TABLE ONLY terraform_state_versions ALTER COLUMN id SET DEFAULT nextval('terraform_state_versions_id_seq'::regclass); +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); -ALTER TABLE ONLY terraform_states ALTER COLUMN id SET DEFAULT nextval('terraform_states_id_seq'::regclass); +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)); -ALTER TABLE ONLY timelogs ALTER COLUMN id SET DEFAULT nextval('timelogs_id_seq'::regclass); +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)); -ALTER TABLE ONLY todos ALTER COLUMN id SET DEFAULT nextval('todos_id_seq'::regclass); +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)); -ALTER TABLE ONLY token_with_ivs ALTER COLUMN id SET DEFAULT nextval('token_with_ivs_id_seq'::regclass); +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); -ALTER TABLE ONLY topics ALTER COLUMN id SET DEFAULT nextval('topics_id_seq'::regclass); +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); -ALTER TABLE ONLY trending_projects ALTER COLUMN id SET DEFAULT nextval('trending_projects_id_seq'::regclass); +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)); -ALTER TABLE ONLY u2f_registrations ALTER COLUMN id SET DEFAULT nextval('u2f_registrations_id_seq'::regclass); +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)); -ALTER TABLE ONLY upcoming_reconciliations ALTER COLUMN id SET DEFAULT nextval('upcoming_reconciliations_id_seq'::regclass); +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)); -ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); +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); -ALTER TABLE ONLY user_agent_details ALTER COLUMN id SET DEFAULT nextval('user_agent_details_id_seq'::regclass); +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)); -ALTER TABLE ONLY user_callouts ALTER COLUMN id SET DEFAULT nextval('user_callouts_id_seq'::regclass); +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); -ALTER TABLE ONLY user_canonical_emails ALTER COLUMN id SET DEFAULT nextval('user_canonical_emails_id_seq'::regclass); +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)); -ALTER TABLE ONLY user_custom_attributes ALTER COLUMN id SET DEFAULT nextval('user_custom_attributes_id_seq'::regclass); +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); -ALTER TABLE ONLY user_details ALTER COLUMN user_id SET DEFAULT nextval('user_details_user_id_seq'::regclass); +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)); -ALTER TABLE ONLY user_group_callouts ALTER COLUMN id SET DEFAULT nextval('user_group_callouts_id_seq'::regclass); +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); -ALTER TABLE ONLY user_permission_export_uploads ALTER COLUMN id SET DEFAULT nextval('user_permission_export_uploads_id_seq'::regclass); +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)); -ALTER TABLE ONLY user_preferences ALTER COLUMN id SET DEFAULT nextval('user_preferences_id_seq'::regclass); +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)); -ALTER TABLE ONLY user_statuses ALTER COLUMN user_id SET DEFAULT nextval('user_statuses_user_id_seq'::regclass); +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); -ALTER TABLE ONLY user_synced_attributes_metadata ALTER COLUMN id SET DEFAULT nextval('user_synced_attributes_metadata_id_seq'::regclass); +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)); -ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); +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)); -ALTER TABLE ONLY users_ops_dashboard_projects ALTER COLUMN id SET DEFAULT nextval('users_ops_dashboard_projects_id_seq'::regclass); +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)); -ALTER TABLE ONLY users_star_projects ALTER COLUMN id SET DEFAULT nextval('users_star_projects_id_seq'::regclass); +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)); -ALTER TABLE ONLY users_statistics ALTER COLUMN id SET DEFAULT nextval('users_statistics_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerabilities ALTER COLUMN id SET DEFAULT nextval('vulnerabilities_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_exports ALTER COLUMN id SET DEFAULT nextval('vulnerability_exports_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_external_issue_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_feedback ALTER COLUMN id SET DEFAULT nextval('vulnerability_feedback_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidence_assets ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_assets_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidence_headers ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_headers_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidence_requests ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_requests_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidence_responses ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_responses_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_finding_evidence_sources ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_sources_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidence_supporting_messages ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_supporting_messages_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_evidences ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidences_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_finding_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_finding_signatures ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_signatures_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_findings_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_findings_remediations_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_flags ALTER COLUMN id SET DEFAULT nextval('vulnerability_flags_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_historical_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_historical_statistics_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_identifiers_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_issue_links_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_occurrence_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_identifiers_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_pipelines_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_occurrences ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrences_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_remediations_id_seq'::regclass); +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)); -ALTER TABLE ONLY vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('vulnerability_scanners_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_statistics_id_seq'::regclass); +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); -ALTER TABLE ONLY vulnerability_user_mentions ALTER COLUMN id SET DEFAULT nextval('vulnerability_user_mentions_id_seq'::regclass); +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)); -ALTER TABLE ONLY web_hook_logs ALTER COLUMN id SET DEFAULT nextval('web_hook_logs_id_seq'::regclass); +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)); -ALTER TABLE ONLY web_hooks ALTER COLUMN id SET DEFAULT nextval('web_hooks_id_seq'::regclass); +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)); -ALTER TABLE ONLY webauthn_registrations ALTER COLUMN id SET DEFAULT nextval('webauthn_registrations_id_seq'::regclass); +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); -ALTER TABLE ONLY wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('wiki_page_meta_id_seq'::regclass); +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); -ALTER TABLE ONLY wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('wiki_page_slugs_id_seq'::regclass); +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)); -ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_types_id_seq'::regclass); +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); -ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass); +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)); -ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass); +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); -ALTER TABLE ONLY x509_issuers ALTER COLUMN id SET DEFAULT nextval('x509_issuers_id_seq'::regclass); +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); -ALTER TABLE ONLY zentao_tracker_data ALTER COLUMN id SET DEFAULT nextval('zentao_tracker_data_id_seq'::regclass); +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)); -ALTER TABLE ONLY zoom_meetings ALTER COLUMN id SET DEFAULT nextval('zoom_meetings_id_seq'::regclass); +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)); -ALTER TABLE ONLY audit_events - ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_000000 - ADD CONSTRAINT audit_events_000000_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202212 - ADD CONSTRAINT audit_events_202212_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202301 - ADD CONSTRAINT audit_events_202301_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202302 - ADD CONSTRAINT audit_events_202302_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202303 - ADD CONSTRAINT audit_events_202303_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202304 - ADD CONSTRAINT audit_events_202304_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202305 - ADD CONSTRAINT audit_events_202305_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202306 - ADD CONSTRAINT audit_events_202306_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202307 - ADD CONSTRAINT audit_events_202307_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY incident_management_pending_alert_escalations - ADD CONSTRAINT incident_management_pending_alert_escalations_pkey PRIMARY KEY (id, process_at); +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); -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); +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); -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); +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)); -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); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 - ADD CONSTRAINT incident_management_pending_alert_escalations_202302_pkey PRIMARY KEY (id, process_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 - ADD CONSTRAINT incident_management_pending_alert_escalations_202303_pkey PRIMARY KEY (id, process_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 - ADD CONSTRAINT incident_management_pending_alert_escalations_202304_pkey PRIMARY KEY (id, process_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 - ADD CONSTRAINT incident_management_pending_alert_escalations_202305_pkey PRIMARY KEY (id, process_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 - ADD CONSTRAINT incident_management_pending_alert_escalations_202306_pkey PRIMARY KEY (id, process_at); +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)); -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); +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)); -ALTER TABLE ONLY incident_management_pending_issue_escalations - ADD CONSTRAINT incident_management_pending_issue_escalations_pkey PRIMARY KEY (id, process_at); +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); -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); +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); -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); +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)); -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); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 - ADD CONSTRAINT incident_management_pending_issue_escalations_202302_pkey PRIMARY KEY (id, process_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 - ADD CONSTRAINT incident_management_pending_issue_escalations_202303_pkey PRIMARY KEY (id, process_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 - ADD CONSTRAINT incident_management_pending_issue_escalations_202304_pkey PRIMARY KEY (id, process_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 - ADD CONSTRAINT incident_management_pending_issue_escalations_202305_pkey PRIMARY KEY (id, process_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 - ADD CONSTRAINT incident_management_pending_issue_escalations_202306_pkey PRIMARY KEY (id, process_at); +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)); -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); +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); -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); +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); -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); +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); -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); +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)); -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); +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)); -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); +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); -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); +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)); -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); +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); -ALTER TABLE ONLY web_hook_logs - ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_000000 - ADD CONSTRAINT web_hook_logs_000000_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202212 - ADD CONSTRAINT web_hook_logs_202212_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202301 - ADD CONSTRAINT web_hook_logs_202301_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202302 - ADD CONSTRAINT web_hook_logs_202302_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202303 - ADD CONSTRAINT web_hook_logs_202303_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202304 - ADD CONSTRAINT web_hook_logs_202304_pkey PRIMARY KEY (id, created_at); +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); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202305 - ADD CONSTRAINT web_hook_logs_202305_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202306 - ADD CONSTRAINT web_hook_logs_202306_pkey PRIMARY KEY (id, created_at); +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)); -ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202307 - ADD CONSTRAINT web_hook_logs_202307_pkey PRIMARY KEY (id, created_at); +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)); -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); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_00_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_01_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_02_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_03_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_04_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_05_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_06_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_07_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_08_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_09_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_10_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_11_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_12_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_13_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_14_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_15_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_16_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_17_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_18_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_19_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_20_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_21_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_22_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_23_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_24_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_25_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +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)); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_26_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX index_issue_search_data_on_issue_id ON ONLY issue_search_data USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_27_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX issue_search_data_00_issue_id_idx ON gitlab_partitions_static.issue_search_data_00 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_28_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX index_issue_search_data_on_search_vector ON ONLY issue_search_data USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_29_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX issue_search_data_00_search_vector_idx ON gitlab_partitions_static.issue_search_data_00 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_30_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX issue_search_data_01_issue_id_idx ON gitlab_partitions_static.issue_search_data_01 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 - ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_31_pkey PRIMARY KEY (stage_event_hash_id, issue_id); +CREATE INDEX issue_search_data_01_search_vector_idx ON gitlab_partitions_static.issue_search_data_01 USING gin (search_vector); -ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_02_issue_id_idx ON gitlab_partitions_static.issue_search_data_02 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_00_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_02_search_vector_idx ON gitlab_partitions_static.issue_search_data_02 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_01_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_03_issue_id_idx ON gitlab_partitions_static.issue_search_data_03 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_02_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_03_search_vector_idx ON gitlab_partitions_static.issue_search_data_03 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_03_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_04_issue_id_idx ON gitlab_partitions_static.issue_search_data_04 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_04_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_04_search_vector_idx ON gitlab_partitions_static.issue_search_data_04 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_05_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_05_issue_id_idx ON gitlab_partitions_static.issue_search_data_05 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_06_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_05_search_vector_idx ON gitlab_partitions_static.issue_search_data_05 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_07_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_06_issue_id_idx ON gitlab_partitions_static.issue_search_data_06 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_08_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_06_search_vector_idx ON gitlab_partitions_static.issue_search_data_06 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_09_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_07_issue_id_idx ON gitlab_partitions_static.issue_search_data_07 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_10_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_07_search_vector_idx ON gitlab_partitions_static.issue_search_data_07 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_11_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_08_issue_id_idx ON gitlab_partitions_static.issue_search_data_08 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_12_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_08_search_vector_idx ON gitlab_partitions_static.issue_search_data_08 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_13_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_09_issue_id_idx ON gitlab_partitions_static.issue_search_data_09 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_14_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_09_search_vector_idx ON gitlab_partitions_static.issue_search_data_09 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_15_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_10_issue_id_idx ON gitlab_partitions_static.issue_search_data_10 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_16_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_10_search_vector_idx ON gitlab_partitions_static.issue_search_data_10 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_17_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_11_issue_id_idx ON gitlab_partitions_static.issue_search_data_11 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_18_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_11_search_vector_idx ON gitlab_partitions_static.issue_search_data_11 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_19_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_12_issue_id_idx ON gitlab_partitions_static.issue_search_data_12 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_20_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_12_search_vector_idx ON gitlab_partitions_static.issue_search_data_12 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_21_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_13_issue_id_idx ON gitlab_partitions_static.issue_search_data_13 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_22_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_13_search_vector_idx ON gitlab_partitions_static.issue_search_data_13 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_23_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_14_issue_id_idx ON gitlab_partitions_static.issue_search_data_14 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_24_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_14_search_vector_idx ON gitlab_partitions_static.issue_search_data_14 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_25_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_15_issue_id_idx ON gitlab_partitions_static.issue_search_data_15 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_26_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_15_search_vector_idx ON gitlab_partitions_static.issue_search_data_15 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_27_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_16_issue_id_idx ON gitlab_partitions_static.issue_search_data_16 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_28_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_16_search_vector_idx ON gitlab_partitions_static.issue_search_data_16 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_29_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_17_issue_id_idx ON gitlab_partitions_static.issue_search_data_17 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 - ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_30_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id); +CREATE INDEX issue_search_data_17_search_vector_idx ON gitlab_partitions_static.issue_search_data_17 USING gin (search_vector); -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); +CREATE INDEX issue_search_data_18_issue_id_idx ON gitlab_partitions_static.issue_search_data_18 USING btree (issue_id); -ALTER TABLE ONLY product_analytics_events_experimental - ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_18_search_vector_idx ON gitlab_partitions_static.issue_search_data_18 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_00 - ADD CONSTRAINT product_analytics_events_experimental_00_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_19_issue_id_idx ON gitlab_partitions_static.issue_search_data_19 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_01 - ADD CONSTRAINT product_analytics_events_experimental_01_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_19_search_vector_idx ON gitlab_partitions_static.issue_search_data_19 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_02 - ADD CONSTRAINT product_analytics_events_experimental_02_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_20_issue_id_idx ON gitlab_partitions_static.issue_search_data_20 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_03 - ADD CONSTRAINT product_analytics_events_experimental_03_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_20_search_vector_idx ON gitlab_partitions_static.issue_search_data_20 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_04 - ADD CONSTRAINT product_analytics_events_experimental_04_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_21_issue_id_idx ON gitlab_partitions_static.issue_search_data_21 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_05 - ADD CONSTRAINT product_analytics_events_experimental_05_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_21_search_vector_idx ON gitlab_partitions_static.issue_search_data_21 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_06 - ADD CONSTRAINT product_analytics_events_experimental_06_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_22_issue_id_idx ON gitlab_partitions_static.issue_search_data_22 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_07 - ADD CONSTRAINT product_analytics_events_experimental_07_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_22_search_vector_idx ON gitlab_partitions_static.issue_search_data_22 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_08 - ADD CONSTRAINT product_analytics_events_experimental_08_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_23_issue_id_idx ON gitlab_partitions_static.issue_search_data_23 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_09 - ADD CONSTRAINT product_analytics_events_experimental_09_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_23_search_vector_idx ON gitlab_partitions_static.issue_search_data_23 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_10 - ADD CONSTRAINT product_analytics_events_experimental_10_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_24_issue_id_idx ON gitlab_partitions_static.issue_search_data_24 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_11 - ADD CONSTRAINT product_analytics_events_experimental_11_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_24_search_vector_idx ON gitlab_partitions_static.issue_search_data_24 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_12 - ADD CONSTRAINT product_analytics_events_experimental_12_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_25_issue_id_idx ON gitlab_partitions_static.issue_search_data_25 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_13 - ADD CONSTRAINT product_analytics_events_experimental_13_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_25_search_vector_idx ON gitlab_partitions_static.issue_search_data_25 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_14 - ADD CONSTRAINT product_analytics_events_experimental_14_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_26_issue_id_idx ON gitlab_partitions_static.issue_search_data_26 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_15 - ADD CONSTRAINT product_analytics_events_experimental_15_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_26_search_vector_idx ON gitlab_partitions_static.issue_search_data_26 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_16 - ADD CONSTRAINT product_analytics_events_experimental_16_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_27_issue_id_idx ON gitlab_partitions_static.issue_search_data_27 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_17 - ADD CONSTRAINT product_analytics_events_experimental_17_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_27_search_vector_idx ON gitlab_partitions_static.issue_search_data_27 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_18 - ADD CONSTRAINT product_analytics_events_experimental_18_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_28_issue_id_idx ON gitlab_partitions_static.issue_search_data_28 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_19 - ADD CONSTRAINT product_analytics_events_experimental_19_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_28_search_vector_idx ON gitlab_partitions_static.issue_search_data_28 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_20 - ADD CONSTRAINT product_analytics_events_experimental_20_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_29_issue_id_idx ON gitlab_partitions_static.issue_search_data_29 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_21 - ADD CONSTRAINT product_analytics_events_experimental_21_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_29_search_vector_idx ON gitlab_partitions_static.issue_search_data_29 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_22 - ADD CONSTRAINT product_analytics_events_experimental_22_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_30_issue_id_idx ON gitlab_partitions_static.issue_search_data_30 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_23 - ADD CONSTRAINT product_analytics_events_experimental_23_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_30_search_vector_idx ON gitlab_partitions_static.issue_search_data_30 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_24 - ADD CONSTRAINT product_analytics_events_experimental_24_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_31_issue_id_idx ON gitlab_partitions_static.issue_search_data_31 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_25 - ADD CONSTRAINT product_analytics_events_experimental_25_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_31_search_vector_idx ON gitlab_partitions_static.issue_search_data_31 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_26 - ADD CONSTRAINT product_analytics_events_experimental_26_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_32_issue_id_idx ON gitlab_partitions_static.issue_search_data_32 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_27 - ADD CONSTRAINT product_analytics_events_experimental_27_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_32_search_vector_idx ON gitlab_partitions_static.issue_search_data_32 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_28 - ADD CONSTRAINT product_analytics_events_experimental_28_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_33_issue_id_idx ON gitlab_partitions_static.issue_search_data_33 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_29 - ADD CONSTRAINT product_analytics_events_experimental_29_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_33_search_vector_idx ON gitlab_partitions_static.issue_search_data_33 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_30 - ADD CONSTRAINT product_analytics_events_experimental_30_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_34_issue_id_idx ON gitlab_partitions_static.issue_search_data_34 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_31 - ADD CONSTRAINT product_analytics_events_experimental_31_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_34_search_vector_idx ON gitlab_partitions_static.issue_search_data_34 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_32 - ADD CONSTRAINT product_analytics_events_experimental_32_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_35_issue_id_idx ON gitlab_partitions_static.issue_search_data_35 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_33 - ADD CONSTRAINT product_analytics_events_experimental_33_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_35_search_vector_idx ON gitlab_partitions_static.issue_search_data_35 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_34 - ADD CONSTRAINT product_analytics_events_experimental_34_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_36_issue_id_idx ON gitlab_partitions_static.issue_search_data_36 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_35 - ADD CONSTRAINT product_analytics_events_experimental_35_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_36_search_vector_idx ON gitlab_partitions_static.issue_search_data_36 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_36 - ADD CONSTRAINT product_analytics_events_experimental_36_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_37_issue_id_idx ON gitlab_partitions_static.issue_search_data_37 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_37 - ADD CONSTRAINT product_analytics_events_experimental_37_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_37_search_vector_idx ON gitlab_partitions_static.issue_search_data_37 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_38 - ADD CONSTRAINT product_analytics_events_experimental_38_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_38_issue_id_idx ON gitlab_partitions_static.issue_search_data_38 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_39 - ADD CONSTRAINT product_analytics_events_experimental_39_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_38_search_vector_idx ON gitlab_partitions_static.issue_search_data_38 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_40 - ADD CONSTRAINT product_analytics_events_experimental_40_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_39_issue_id_idx ON gitlab_partitions_static.issue_search_data_39 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_41 - ADD CONSTRAINT product_analytics_events_experimental_41_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_39_search_vector_idx ON gitlab_partitions_static.issue_search_data_39 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_42 - ADD CONSTRAINT product_analytics_events_experimental_42_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_40_issue_id_idx ON gitlab_partitions_static.issue_search_data_40 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_43 - ADD CONSTRAINT product_analytics_events_experimental_43_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_40_search_vector_idx ON gitlab_partitions_static.issue_search_data_40 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_44 - ADD CONSTRAINT product_analytics_events_experimental_44_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_41_issue_id_idx ON gitlab_partitions_static.issue_search_data_41 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_45 - ADD CONSTRAINT product_analytics_events_experimental_45_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_41_search_vector_idx ON gitlab_partitions_static.issue_search_data_41 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_46 - ADD CONSTRAINT product_analytics_events_experimental_46_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_42_issue_id_idx ON gitlab_partitions_static.issue_search_data_42 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_47 - ADD CONSTRAINT product_analytics_events_experimental_47_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_42_search_vector_idx ON gitlab_partitions_static.issue_search_data_42 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_48 - ADD CONSTRAINT product_analytics_events_experimental_48_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_43_issue_id_idx ON gitlab_partitions_static.issue_search_data_43 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_49 - ADD CONSTRAINT product_analytics_events_experimental_49_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_43_search_vector_idx ON gitlab_partitions_static.issue_search_data_43 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_50 - ADD CONSTRAINT product_analytics_events_experimental_50_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_44_issue_id_idx ON gitlab_partitions_static.issue_search_data_44 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_51 - ADD CONSTRAINT product_analytics_events_experimental_51_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_44_search_vector_idx ON gitlab_partitions_static.issue_search_data_44 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_52 - ADD CONSTRAINT product_analytics_events_experimental_52_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_45_issue_id_idx ON gitlab_partitions_static.issue_search_data_45 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_53 - ADD CONSTRAINT product_analytics_events_experimental_53_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_45_search_vector_idx ON gitlab_partitions_static.issue_search_data_45 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_54 - ADD CONSTRAINT product_analytics_events_experimental_54_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_46_issue_id_idx ON gitlab_partitions_static.issue_search_data_46 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_55 - ADD CONSTRAINT product_analytics_events_experimental_55_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_46_search_vector_idx ON gitlab_partitions_static.issue_search_data_46 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_56 - ADD CONSTRAINT product_analytics_events_experimental_56_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_47_issue_id_idx ON gitlab_partitions_static.issue_search_data_47 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_57 - ADD CONSTRAINT product_analytics_events_experimental_57_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_47_search_vector_idx ON gitlab_partitions_static.issue_search_data_47 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_58 - ADD CONSTRAINT product_analytics_events_experimental_58_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_48_issue_id_idx ON gitlab_partitions_static.issue_search_data_48 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_59 - ADD CONSTRAINT product_analytics_events_experimental_59_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_48_search_vector_idx ON gitlab_partitions_static.issue_search_data_48 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_60 - ADD CONSTRAINT product_analytics_events_experimental_60_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_49_issue_id_idx ON gitlab_partitions_static.issue_search_data_49 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_61 - ADD CONSTRAINT product_analytics_events_experimental_61_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_49_search_vector_idx ON gitlab_partitions_static.issue_search_data_49 USING gin (search_vector); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_62 - ADD CONSTRAINT product_analytics_events_experimental_62_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_50_issue_id_idx ON gitlab_partitions_static.issue_search_data_50 USING btree (issue_id); -ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_63 - ADD CONSTRAINT product_analytics_events_experimental_63_pkey PRIMARY KEY (id, project_id); +CREATE INDEX issue_search_data_50_search_vector_idx ON gitlab_partitions_static.issue_search_data_50 USING gin (search_vector); -ALTER TABLE ONLY abuse_reports - ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_51_issue_id_idx ON gitlab_partitions_static.issue_search_data_51 USING btree (issue_id); -ALTER TABLE ONLY agent_group_authorizations - ADD CONSTRAINT agent_group_authorizations_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_51_search_vector_idx ON gitlab_partitions_static.issue_search_data_51 USING gin (search_vector); -ALTER TABLE ONLY alert_management_alert_assignees - ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_52_issue_id_idx ON gitlab_partitions_static.issue_search_data_52 USING btree (issue_id); -ALTER TABLE ONLY alert_management_alert_user_mentions - ADD CONSTRAINT alert_management_alert_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_52_search_vector_idx ON gitlab_partitions_static.issue_search_data_52 USING gin (search_vector); -ALTER TABLE ONLY alert_management_alerts - ADD CONSTRAINT alert_management_alerts_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_53_issue_id_idx ON gitlab_partitions_static.issue_search_data_53 USING btree (issue_id); -ALTER TABLE ONLY alert_management_http_integrations - ADD CONSTRAINT alert_management_http_integrations_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_53_search_vector_idx ON gitlab_partitions_static.issue_search_data_53 USING gin (search_vector); -ALTER TABLE ONLY allowed_email_domains - ADD CONSTRAINT allowed_email_domains_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_54_issue_id_idx ON gitlab_partitions_static.issue_search_data_54 USING btree (issue_id); -ALTER TABLE ONLY analytics_cycle_analytics_group_stages - ADD CONSTRAINT analytics_cycle_analytics_group_stages_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_54_search_vector_idx ON gitlab_partitions_static.issue_search_data_54 USING gin (search_vector); -ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams - ADD CONSTRAINT analytics_cycle_analytics_group_value_streams_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_55_issue_id_idx ON gitlab_partitions_static.issue_search_data_55 USING btree (issue_id); -ALTER TABLE ONLY analytics_cycle_analytics_project_stages - ADD CONSTRAINT analytics_cycle_analytics_project_stages_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_55_search_vector_idx ON gitlab_partitions_static.issue_search_data_55 USING gin (search_vector); -ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams - ADD CONSTRAINT analytics_cycle_analytics_project_value_streams_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_56_issue_id_idx ON gitlab_partitions_static.issue_search_data_56 USING btree (issue_id); -ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes - ADD CONSTRAINT analytics_cycle_analytics_stage_event_hashes_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_56_search_vector_idx ON gitlab_partitions_static.issue_search_data_56 USING gin (search_vector); -ALTER TABLE ONLY analytics_devops_adoption_segments - ADD CONSTRAINT analytics_devops_adoption_segments_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_57_issue_id_idx ON gitlab_partitions_static.issue_search_data_57 USING btree (issue_id); -ALTER TABLE ONLY analytics_devops_adoption_snapshots - ADD CONSTRAINT analytics_devops_adoption_snapshots_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_57_search_vector_idx ON gitlab_partitions_static.issue_search_data_57 USING gin (search_vector); -ALTER TABLE ONLY analytics_language_trend_repository_languages - ADD CONSTRAINT analytics_language_trend_repository_languages_pkey PRIMARY KEY (programming_language_id, project_id, snapshot_date); +CREATE INDEX issue_search_data_58_issue_id_idx ON gitlab_partitions_static.issue_search_data_58 USING btree (issue_id); -ALTER TABLE ONLY analytics_usage_trends_measurements - ADD CONSTRAINT analytics_usage_trends_measurements_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_58_search_vector_idx ON gitlab_partitions_static.issue_search_data_58 USING gin (search_vector); -ALTER TABLE ONLY appearances - ADD CONSTRAINT appearances_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_59_issue_id_idx ON gitlab_partitions_static.issue_search_data_59 USING btree (issue_id); -ALTER TABLE ONLY application_setting_terms - ADD CONSTRAINT application_setting_terms_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_59_search_vector_idx ON gitlab_partitions_static.issue_search_data_59 USING gin (search_vector); -ALTER TABLE ONLY application_settings - ADD CONSTRAINT application_settings_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_60_issue_id_idx ON gitlab_partitions_static.issue_search_data_60 USING btree (issue_id); -ALTER TABLE ONLY approval_merge_request_rule_sources - ADD CONSTRAINT approval_merge_request_rule_sources_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_60_search_vector_idx ON gitlab_partitions_static.issue_search_data_60 USING gin (search_vector); -ALTER TABLE ONLY approval_merge_request_rules_approved_approvers - ADD CONSTRAINT approval_merge_request_rules_approved_approvers_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_61_issue_id_idx ON gitlab_partitions_static.issue_search_data_61 USING btree (issue_id); -ALTER TABLE ONLY approval_merge_request_rules_groups - ADD CONSTRAINT approval_merge_request_rules_groups_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_61_search_vector_idx ON gitlab_partitions_static.issue_search_data_61 USING gin (search_vector); -ALTER TABLE ONLY approval_merge_request_rules - ADD CONSTRAINT approval_merge_request_rules_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_62_issue_id_idx ON gitlab_partitions_static.issue_search_data_62 USING btree (issue_id); -ALTER TABLE ONLY approval_merge_request_rules_users - ADD CONSTRAINT approval_merge_request_rules_users_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_62_search_vector_idx ON gitlab_partitions_static.issue_search_data_62 USING gin (search_vector); -ALTER TABLE ONLY approval_project_rules_groups - ADD CONSTRAINT approval_project_rules_groups_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_63_issue_id_idx ON gitlab_partitions_static.issue_search_data_63 USING btree (issue_id); -ALTER TABLE ONLY approval_project_rules - ADD CONSTRAINT approval_project_rules_pkey PRIMARY KEY (id); +CREATE INDEX issue_search_data_63_search_vector_idx ON gitlab_partitions_static.issue_search_data_63 USING gin (search_vector); -ALTER TABLE ONLY approval_project_rules_protected_branches - ADD CONSTRAINT approval_project_rules_protected_branches_pkey PRIMARY KEY (approval_project_rule_id, protected_branch_id); +CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY approval_project_rules_users - ADD CONSTRAINT approval_project_rules_users_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY approvals - ADD CONSTRAINT approvals_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx11 ON gitlab_partitions_static.product_analytics_events_experimental_11 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY approver_groups - ADD CONSTRAINT approver_groups_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx12 ON gitlab_partitions_static.product_analytics_events_experimental_12 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY approvers - ADD CONSTRAINT approvers_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx13 ON gitlab_partitions_static.product_analytics_events_experimental_13 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY atlassian_identities - ADD CONSTRAINT atlassian_identities_pkey PRIMARY KEY (user_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx14 ON gitlab_partitions_static.product_analytics_events_experimental_14 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY audit_events_external_audit_event_destinations - ADD CONSTRAINT audit_events_external_audit_event_destinations_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx15 ON gitlab_partitions_static.product_analytics_events_experimental_15 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY authentication_events - ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx16 ON gitlab_partitions_static.product_analytics_events_experimental_16 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY award_emoji - ADD CONSTRAINT award_emoji_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx17 ON gitlab_partitions_static.product_analytics_events_experimental_17 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY aws_roles - ADD CONSTRAINT aws_roles_pkey PRIMARY KEY (user_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx18 ON gitlab_partitions_static.product_analytics_events_experimental_18 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY background_migration_jobs - ADD CONSTRAINT background_migration_jobs_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx19 ON gitlab_partitions_static.product_analytics_events_experimental_19 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY badges - ADD CONSTRAINT badges_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx20 ON gitlab_partitions_static.product_analytics_events_experimental_20 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY banned_users - ADD CONSTRAINT banned_users_pkey PRIMARY KEY (user_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx21 ON gitlab_partitions_static.product_analytics_events_experimental_21 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY batched_background_migration_jobs - ADD CONSTRAINT batched_background_migration_jobs_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx22 ON gitlab_partitions_static.product_analytics_events_experimental_22 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY batched_background_migrations - ADD CONSTRAINT batched_background_migrations_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx23 ON gitlab_partitions_static.product_analytics_events_experimental_23 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY board_assignees - ADD CONSTRAINT board_assignees_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx24 ON gitlab_partitions_static.product_analytics_events_experimental_24 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY board_group_recent_visits - ADD CONSTRAINT board_group_recent_visits_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx25 ON gitlab_partitions_static.product_analytics_events_experimental_25 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY board_labels - ADD CONSTRAINT board_labels_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx26 ON gitlab_partitions_static.product_analytics_events_experimental_26 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY board_project_recent_visits - ADD CONSTRAINT board_project_recent_visits_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx27 ON gitlab_partitions_static.product_analytics_events_experimental_27 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY board_user_preferences - ADD CONSTRAINT board_user_preferences_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx28 ON gitlab_partitions_static.product_analytics_events_experimental_28 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_board_labels - ADD CONSTRAINT boards_epic_board_labels_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx29 ON gitlab_partitions_static.product_analytics_events_experimental_29 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_board_positions - ADD CONSTRAINT boards_epic_board_positions_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx30 ON gitlab_partitions_static.product_analytics_events_experimental_30 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_board_recent_visits - ADD CONSTRAINT boards_epic_board_recent_visits_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx31 ON gitlab_partitions_static.product_analytics_events_experimental_31 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_boards - ADD CONSTRAINT boards_epic_boards_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx32 ON gitlab_partitions_static.product_analytics_events_experimental_32 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_list_user_preferences - ADD CONSTRAINT boards_epic_list_user_preferences_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx33 ON gitlab_partitions_static.product_analytics_events_experimental_33 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_lists - ADD CONSTRAINT boards_epic_lists_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx34 ON gitlab_partitions_static.product_analytics_events_experimental_34 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards_epic_user_preferences - ADD CONSTRAINT boards_epic_user_preferences_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx35 ON gitlab_partitions_static.product_analytics_events_experimental_35 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY boards - ADD CONSTRAINT boards_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx36 ON gitlab_partitions_static.product_analytics_events_experimental_36 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY broadcast_messages - ADD CONSTRAINT broadcast_messages_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx37 ON gitlab_partitions_static.product_analytics_events_experimental_37 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_configurations - ADD CONSTRAINT bulk_import_configurations_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx38 ON gitlab_partitions_static.product_analytics_events_experimental_38 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_entities - ADD CONSTRAINT bulk_import_entities_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx39 ON gitlab_partitions_static.product_analytics_events_experimental_39 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_export_uploads - ADD CONSTRAINT bulk_import_export_uploads_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx40 ON gitlab_partitions_static.product_analytics_events_experimental_40 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_exports - ADD CONSTRAINT bulk_import_exports_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx41 ON gitlab_partitions_static.product_analytics_events_experimental_41 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_failures - ADD CONSTRAINT bulk_import_failures_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx42 ON gitlab_partitions_static.product_analytics_events_experimental_42 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_import_trackers - ADD CONSTRAINT bulk_import_trackers_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx43 ON gitlab_partitions_static.product_analytics_events_experimental_43 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY bulk_imports - ADD CONSTRAINT bulk_imports_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx44 ON gitlab_partitions_static.product_analytics_events_experimental_44 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY chat_names - ADD CONSTRAINT chat_names_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx45 ON gitlab_partitions_static.product_analytics_events_experimental_45 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY chat_teams - ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx46 ON gitlab_partitions_static.product_analytics_events_experimental_46 USING btree (project_id, collector_tstamp); -ALTER TABLE vulnerability_scanners - ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx47 ON gitlab_partitions_static.product_analytics_events_experimental_47 USING btree (project_id, collector_tstamp); -ALTER TABLE sprints - ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID; +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx48 ON gitlab_partitions_static.product_analytics_events_experimental_48 USING btree (project_id, collector_tstamp); -ALTER TABLE group_import_states - ADD CONSTRAINT check_cda75c7c3f CHECK ((user_id IS NOT NULL)) NOT VALID; +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx49 ON gitlab_partitions_static.product_analytics_events_experimental_49 USING btree (project_id, collector_tstamp); -ALTER TABLE sprints - ADD CONSTRAINT check_df3816aed7 CHECK ((due_date IS NOT NULL)) NOT VALID; +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx50 ON gitlab_partitions_static.product_analytics_events_experimental_50 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_build_needs - ADD CONSTRAINT ci_build_needs_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx51 ON gitlab_partitions_static.product_analytics_events_experimental_51 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_build_pending_states - ADD CONSTRAINT ci_build_pending_states_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx52 ON gitlab_partitions_static.product_analytics_events_experimental_52 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_build_report_results - ADD CONSTRAINT ci_build_report_results_pkey PRIMARY KEY (build_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx53 ON gitlab_partitions_static.product_analytics_events_experimental_53 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_build_trace_chunks - ADD CONSTRAINT ci_build_trace_chunks_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx54 ON gitlab_partitions_static.product_analytics_events_experimental_54 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_build_trace_metadata - ADD CONSTRAINT ci_build_trace_metadata_pkey PRIMARY KEY (build_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx55 ON gitlab_partitions_static.product_analytics_events_experimental_55 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY dep_ci_build_trace_sections - ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx56 ON gitlab_partitions_static.product_analytics_events_experimental_56 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_builds_metadata - ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx57 ON gitlab_partitions_static.product_analytics_events_experimental_57 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_builds - ADD CONSTRAINT ci_builds_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx58 ON gitlab_partitions_static.product_analytics_events_experimental_58 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_builds_runner_session - ADD CONSTRAINT ci_builds_runner_session_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx59 ON gitlab_partitions_static.product_analytics_events_experimental_59 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_daily_build_group_report_results - ADD CONSTRAINT ci_daily_build_group_report_results_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx60 ON gitlab_partitions_static.product_analytics_events_experimental_60 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_deleted_objects - ADD CONSTRAINT ci_deleted_objects_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx61 ON gitlab_partitions_static.product_analytics_events_experimental_61 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_freeze_periods - ADD CONSTRAINT ci_freeze_periods_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx62 ON gitlab_partitions_static.product_analytics_events_experimental_62 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_group_variables - ADD CONSTRAINT ci_group_variables_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx63 ON gitlab_partitions_static.product_analytics_events_experimental_63 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_instance_variables - ADD CONSTRAINT ci_instance_variables_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx1 ON gitlab_partitions_static.product_analytics_events_experimental_01 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_job_artifacts - ADD CONSTRAINT ci_job_artifacts_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx2 ON gitlab_partitions_static.product_analytics_events_experimental_02 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_job_token_project_scope_links - ADD CONSTRAINT ci_job_token_project_scope_links_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx3 ON gitlab_partitions_static.product_analytics_events_experimental_03 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_job_variables - ADD CONSTRAINT ci_job_variables_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx4 ON gitlab_partitions_static.product_analytics_events_experimental_04 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_minutes_additional_packs - ADD CONSTRAINT ci_minutes_additional_packs_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx5 ON gitlab_partitions_static.product_analytics_events_experimental_05 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_namespace_monthly_usages - ADD CONSTRAINT ci_namespace_monthly_usages_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx6 ON gitlab_partitions_static.product_analytics_events_experimental_06 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_pending_builds - ADD CONSTRAINT ci_pending_builds_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx7 ON gitlab_partitions_static.product_analytics_events_experimental_07 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_pipeline_artifacts - ADD CONSTRAINT ci_pipeline_artifacts_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx8 ON gitlab_partitions_static.product_analytics_events_experimental_08 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_pipeline_chat_data - ADD CONSTRAINT ci_pipeline_chat_data_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx9 ON gitlab_partitions_static.product_analytics_events_experimental_09 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_pipeline_messages - ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id); +CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON gitlab_partitions_static.product_analytics_events_experimental_00 USING btree (project_id, collector_tstamp); -ALTER TABLE ONLY ci_pipeline_schedule_variables - ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id); +CREATE INDEX active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[])))); -ALTER TABLE ONLY ci_pipeline_schedules - ADD CONSTRAINT ci_pipeline_schedules_pkey PRIMARY KEY (id); +CREATE INDEX analytics_index_events_on_created_at_and_author_id ON events USING btree (created_at, author_id); -ALTER TABLE ONLY ci_pipeline_variables - ADD CONSTRAINT ci_pipeline_variables_pkey PRIMARY KEY (id); +CREATE INDEX analytics_repository_languages_on_project_id ON analytics_language_trend_repository_languages USING btree (project_id); -ALTER TABLE ONLY ci_pipelines_config - ADD CONSTRAINT ci_pipelines_config_pkey PRIMARY KEY (pipeline_id); +CREATE UNIQUE INDEX any_approver_merge_request_rule_type_unique_index ON approval_merge_request_rules USING btree (merge_request_id, rule_type) WHERE (rule_type = 4); -ALTER TABLE ONLY ci_pipelines - ADD CONSTRAINT ci_pipelines_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON approval_project_rules USING btree (project_id) WHERE (rule_type = 3); -ALTER TABLE ONLY ci_platform_metrics - ADD CONSTRAINT ci_platform_metrics_pkey PRIMARY KEY (id); +CREATE INDEX approval_mr_rule_index_merge_request_id ON approval_merge_request_rules USING btree (merge_request_id); + +CREATE UNIQUE INDEX bulk_import_trackers_uniq_relation_by_entity ON bulk_import_trackers USING btree (bulk_import_entity_id, relation); -ALTER TABLE ONLY ci_project_monthly_usages - ADD CONSTRAINT ci_project_monthly_usages_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY ci_refs - ADD CONSTRAINT ci_refs_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY ci_resource_groups - ADD CONSTRAINT ci_resource_groups_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY ci_resources - ADD CONSTRAINT ci_resources_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY ci_runner_namespaces - ADD CONSTRAINT ci_runner_namespaces_pkey PRIMARY KEY (id); +CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); -ALTER TABLE ONLY ci_runner_projects - ADD CONSTRAINT ci_runner_projects_pkey PRIMARY KEY (id); +CREATE INDEX ci_job_artifacts_expire_at_unlocked_idx ON ci_job_artifacts USING btree (expire_at) WHERE (locked = 0); -ALTER TABLE ONLY ci_runners - ADD CONSTRAINT ci_runners_pkey PRIMARY KEY (id); +CREATE INDEX code_owner_approval_required ON protected_branches USING btree (project_id, code_owner_approval_required) WHERE (code_owner_approval_required = true); -ALTER TABLE ONLY ci_running_builds - ADD CONSTRAINT ci_running_builds_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX commit_user_mentions_on_commit_id_and_note_id_unique_index ON commit_user_mentions USING btree (commit_id, note_id); -ALTER TABLE ONLY ci_sources_pipelines - ADD CONSTRAINT ci_sources_pipelines_pkey PRIMARY KEY (id); +CREATE INDEX composer_cache_files_index_on_deleted_at ON packages_composer_cache_files USING btree (delete_at, id); -ALTER TABLE ONLY ci_sources_projects - ADD CONSTRAINT ci_sources_projects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX dast_scanner_profiles_builds_on_ci_build_id ON dast_scanner_profiles_builds USING btree (ci_build_id); -ALTER TABLE ONLY ci_stages - ADD CONSTRAINT ci_stages_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX dast_site_profiles_builds_on_ci_build_id ON dast_site_profiles_builds USING btree (ci_build_id); -ALTER TABLE ONLY ci_subscriptions_projects - ADD CONSTRAINT ci_subscriptions_projects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX design_management_designs_versions_uniqueness ON design_management_designs_versions USING btree (design_id, version_id); -ALTER TABLE ONLY ci_trigger_requests - ADD CONSTRAINT ci_trigger_requests_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX design_user_mentions_on_design_id_and_note_id_unique_index ON design_user_mentions USING btree (design_id, note_id); -ALTER TABLE ONLY ci_triggers - ADD CONSTRAINT ci_triggers_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON epic_user_mentions USING btree (epic_id, note_id); -ALTER TABLE ONLY ci_unit_test_failures - ADD CONSTRAINT ci_unit_test_failures_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL); -ALTER TABLE ONLY ci_unit_tests - ADD CONSTRAINT ci_unit_tests_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX finding_evidences_on_unique_vulnerability_occurrence_id ON vulnerability_finding_evidences USING btree (vulnerability_occurrence_id); -ALTER TABLE ONLY ci_variables - ADD CONSTRAINT ci_variables_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX finding_link_name_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, name, url); -ALTER TABLE ONLY cluster_agent_tokens - ADD CONSTRAINT cluster_agent_tokens_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX finding_link_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, url) WHERE (name IS NULL); -ALTER TABLE ONLY cluster_agents - ADD CONSTRAINT cluster_agents_pkey PRIMARY KEY (id); +CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id); -ALTER TABLE ONLY cluster_groups - ADD CONSTRAINT cluster_groups_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX i_ci_job_token_project_scope_links_on_source_and_target_project ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id); -ALTER TABLE ONLY cluster_platforms_kubernetes - ADD CONSTRAINT cluster_platforms_kubernetes_pkey PRIMARY KEY (id); +CREATE INDEX idx_analytics_devops_adoption_segments_on_namespace_id ON analytics_devops_adoption_segments USING btree (namespace_id); -ALTER TABLE ONLY cluster_projects - ADD CONSTRAINT cluster_projects_pkey PRIMARY KEY (id); +CREATE INDEX idx_analytics_devops_adoption_snapshots_finalized ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time) WHERE (recorded_at >= end_time); -ALTER TABLE ONLY cluster_providers_aws - ADD CONSTRAINT cluster_providers_aws_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY cluster_providers_gcp - ADD CONSTRAINT cluster_providers_gcp_pkey PRIMARY KEY (id); +CREATE INDEX idx_build_artifacts_size_refreshes_state_updated_at ON project_build_artifacts_size_refreshes USING btree (state, updated_at); -ALTER TABLE ONLY clusters_applications_cert_managers - ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id); +CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); -ALTER TABLE ONLY clusters_applications_cilium - ADD CONSTRAINT clusters_applications_cilium_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY clusters_applications_crossplane - ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id); +CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at_enabled ON container_expiration_policies USING btree (project_id, next_run_at, enabled); -ALTER TABLE ONLY clusters_applications_elastic_stacks - ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY clusters_applications_helm - ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY clusters_applications_ingress - ADD CONSTRAINT clusters_applications_ingress_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY clusters_applications_jupyter - ADD CONSTRAINT clusters_applications_jupyter_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY clusters_applications_knative - ADD CONSTRAINT clusters_applications_knative_pkey PRIMARY KEY (id); +CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace); -ALTER TABLE ONLY clusters_applications_prometheus - ADD CONSTRAINT clusters_applications_prometheus_pkey PRIMARY KEY (id); +CREATE INDEX idx_devops_adoption_segments_namespace_end_time ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time); -ALTER TABLE ONLY clusters_applications_runners - ADD CONSTRAINT clusters_applications_runners_pkey PRIMARY KEY (id); +CREATE INDEX idx_devops_adoption_segments_namespace_recorded_at ON analytics_devops_adoption_snapshots USING btree (namespace_id, recorded_at); -ALTER TABLE ONLY clusters_integration_elasticstack - ADD CONSTRAINT clusters_integration_elasticstack_pkey PRIMARY KEY (cluster_id); +CREATE UNIQUE INDEX idx_devops_adoption_segments_namespaces_pair ON analytics_devops_adoption_segments USING btree (display_namespace_id, namespace_id); -ALTER TABLE ONLY clusters_integration_prometheus - ADD CONSTRAINT clusters_integration_prometheus_pkey PRIMARY KEY (cluster_id); +CREATE INDEX idx_eaprpb_external_approval_rule_id ON external_approval_rules_protected_branches USING btree (external_approval_rule_id); -ALTER TABLE ONLY clusters_kubernetes_namespaces - ADD CONSTRAINT clusters_kubernetes_namespaces_pkey PRIMARY KEY (id); +CREATE INDEX idx_elastic_reindexing_slices_on_elastic_reindexing_subtask_id ON elastic_reindexing_slices USING btree (elastic_reindexing_subtask_id); -ALTER TABLE ONLY clusters - ADD CONSTRAINT clusters_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_merge_requests USING btree (environment_id, merge_request_id); -ALTER TABLE ONLY commit_user_mentions - ADD CONSTRAINT commit_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX idx_geo_con_rep_updated_events_on_container_repository_id ON geo_container_repository_updated_events USING btree (container_repository_id); -ALTER TABLE ONLY compliance_management_frameworks - ADD CONSTRAINT compliance_management_frameworks_pkey PRIMARY KEY (id); +CREATE INDEX idx_installable_helm_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id); -ALTER TABLE ONLY container_expiration_policies - ADD CONSTRAINT container_expiration_policies_pkey PRIMARY KEY (project_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)); -ALTER TABLE ONLY container_repositories - ADD CONSTRAINT container_repositories_pkey PRIMARY KEY (id); +CREATE INDEX idx_issues_on_health_status_not_null ON issues USING btree (health_status) WHERE (health_status IS NOT NULL); -ALTER TABLE ONLY conversational_development_index_metrics - ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id); +CREATE INDEX idx_issues_on_project_id_and_created_at_and_id_and_state_id ON issues USING btree (project_id, created_at, id, state_id); -ALTER TABLE ONLY csv_issue_imports - ADD CONSTRAINT csv_issue_imports_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY custom_emoji - ADD CONSTRAINT custom_emoji_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY customer_relations_contacts - ADD CONSTRAINT customer_relations_contacts_pkey PRIMARY KEY (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); -ALTER TABLE ONLY customer_relations_organizations - ADD CONSTRAINT customer_relations_organizations_pkey PRIMARY KEY (id); +CREATE INDEX idx_issues_on_state_id ON issues USING btree (state_id); -ALTER TABLE ONLY dast_profile_schedules - ADD CONSTRAINT dast_profile_schedules_pkey PRIMARY KEY (id); +CREATE INDEX idx_jira_connect_subscriptions_on_installation_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id); -ALTER TABLE ONLY dast_profiles_pipelines - ADD CONSTRAINT dast_profiles_pipelines_pkey PRIMARY KEY (dast_profile_id, ci_pipeline_id); +CREATE UNIQUE INDEX idx_jira_connect_subscriptions_on_installation_id_namespace_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id, namespace_id); -ALTER TABLE ONLY dast_profiles - ADD CONSTRAINT dast_profiles_pkey PRIMARY KEY (id); +CREATE INDEX idx_keys_expires_at_and_before_expiry_notification_undelivered ON keys USING btree (date(timezone('UTC'::text, expires_at)), before_expiry_notification_delivered_at) WHERE (before_expiry_notification_delivered_at IS NULL); -ALTER TABLE ONLY dast_scanner_profiles_builds - ADD CONSTRAINT dast_scanner_profiles_builds_pkey PRIMARY KEY (dast_scanner_profile_id, ci_build_id); +CREATE INDEX idx_members_created_at_user_id_invite_token ON members USING btree (created_at) WHERE ((invite_token IS NOT NULL) AND (user_id IS NULL)); -ALTER TABLE ONLY dast_scanner_profiles - ADD CONSTRAINT dast_scanner_profiles_pkey PRIMARY KEY (id); +CREATE INDEX idx_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND (state_id = 4)); -ALTER TABLE ONLY dast_site_profile_secret_variables - ADD CONSTRAINT dast_site_profile_secret_variables_pkey PRIMARY KEY (id); +CREATE INDEX idx_merge_requests_on_merged_state ON merge_requests USING btree (id) WHERE (state_id = 3); -ALTER TABLE ONLY dast_site_profiles_builds - ADD CONSTRAINT dast_site_profiles_builds_pkey PRIMARY KEY (dast_site_profile_id, ci_build_id); +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); -ALTER TABLE ONLY dast_site_profiles_pipelines - ADD CONSTRAINT dast_site_profiles_pipelines_pkey PRIMARY KEY (dast_site_profile_id, ci_pipeline_id); +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)); -ALTER TABLE ONLY dast_site_profiles - ADD CONSTRAINT dast_site_profiles_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY dast_site_tokens - ADD CONSTRAINT dast_site_tokens_pkey PRIMARY KEY (id); +CREATE INDEX idx_merge_requests_on_target_project_id_and_locked_state ON merge_requests USING btree (target_project_id) WHERE (state_id = 4); -ALTER TABLE ONLY dast_site_validations - ADD CONSTRAINT dast_site_validations_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_metrics_users_starred_dashboard_on_user_project_dashboard ON metrics_users_starred_dashboards USING btree (user_id, project_id, dashboard_path); -ALTER TABLE ONLY dast_sites - ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); +CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_commit_diff_files USING btree (merge_request_context_commit_id, sha); -ALTER TABLE ONLY dep_ci_build_trace_section_names - ADD CONSTRAINT dep_ci_build_trace_section_names_pkey PRIMARY KEY (id); +CREATE INDEX idx_mrs_on_target_id_and_created_at_and_state_id ON merge_requests USING btree (target_project_id, state_id, created_at, id); -ALTER TABLE ONLY dependency_proxy_blobs - ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name); -ALTER TABLE ONLY dependency_proxy_group_settings - ADD CONSTRAINT dependency_proxy_group_settings_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_external_url ON external_approval_rules USING btree (project_id, external_url); -ALTER TABLE ONLY dependency_proxy_image_ttl_group_policies - ADD CONSTRAINT dependency_proxy_image_ttl_group_policies_pkey PRIMARY KEY (group_id); +CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_name ON external_approval_rules USING btree (project_id, name); -ALTER TABLE ONLY dependency_proxy_manifests - ADD CONSTRAINT dependency_proxy_manifests_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_external_url ON external_status_checks USING btree (project_id, external_url); -ALTER TABLE ONLY deploy_keys_projects - ADD CONSTRAINT deploy_keys_projects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_name ON external_status_checks USING btree (project_id, name); -ALTER TABLE ONLY deploy_tokens - ADD CONSTRAINT deploy_tokens_pkey PRIMARY KEY (id); +CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id); -ALTER TABLE ONLY deployment_clusters - ADD CONSTRAINT deployment_clusters_pkey PRIMARY KEY (deployment_id); +CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON packages_debian_project_component_files USING btree (architecture_id); -ALTER TABLE ONLY deployment_merge_requests - ADD CONSTRAINT deployment_merge_requests_pkey PRIMARY KEY (deployment_id, merge_request_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)); -ALTER TABLE ONLY deployments - ADD CONSTRAINT deployments_pkey PRIMARY KEY (id); +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)); -ALTER TABLE ONLY description_versions - ADD CONSTRAINT description_versions_pkey PRIMARY KEY (id); +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)); -ALTER TABLE ONLY design_management_designs - ADD CONSTRAINT design_management_designs_pkey PRIMARY KEY (id); +CREATE INDEX idx_packages_packages_on_project_id_name_version_package_type ON packages_packages USING btree (project_id, name, version, package_type); -ALTER TABLE ONLY design_management_designs_versions - ADD CONSTRAINT design_management_designs_versions_pkey PRIMARY KEY (id); +CREATE INDEX idx_pkgs_debian_group_distribution_keys_on_distribution_id ON packages_debian_group_distribution_keys USING btree (distribution_id); -ALTER TABLE ONLY design_management_versions - ADD CONSTRAINT design_management_versions_pkey PRIMARY KEY (id); +CREATE INDEX idx_pkgs_debian_project_distribution_keys_on_distribution_id ON packages_debian_project_distribution_keys USING btree (distribution_id); -ALTER TABLE ONLY design_user_mentions - ADD CONSTRAINT design_user_mentions_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_pkgs_dep_links_on_pkg_id_dependency_id_dependency_type ON packages_dependency_links USING btree (package_id, dependency_id, dependency_type); -ALTER TABLE ONLY detached_partitions - ADD CONSTRAINT detached_partitions_pkey PRIMARY KEY (id); +CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_cloud_last_sync_at, project_id) WHERE (jira_dvcs_cloud_last_sync_at IS NOT NULL); -ALTER TABLE ONLY diff_note_positions - ADD CONSTRAINT diff_note_positions_pkey PRIMARY KEY (id); +CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_server_last_sync_at, project_id) WHERE (jira_dvcs_server_last_sync_at IS NOT NULL); -ALTER TABLE ONLY dora_daily_metrics - ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_events ON self_managed_prometheus_alert_events USING btree (project_id, payload_key); -ALTER TABLE ONLY draft_notes - ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id); +CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL); -ALTER TABLE ONLY elastic_index_settings - ADD CONSTRAINT elastic_index_settings_pkey PRIMARY KEY (id); +CREATE INDEX idx_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false) AND (hidden = false)); -ALTER TABLE ONLY elastic_reindexing_slices - ADD CONSTRAINT elastic_reindexing_slices_pkey PRIMARY KEY (id); +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)); -ALTER TABLE ONLY elastic_reindexing_subtasks - ADD CONSTRAINT elastic_reindexing_subtasks_pkey PRIMARY KEY (id); +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)); -ALTER TABLE ONLY elastic_reindexing_tasks - ADD CONSTRAINT elastic_reindexing_tasks_pkey PRIMARY KEY (id); +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)); -ALTER TABLE ONLY elasticsearch_indexed_namespaces - ADD CONSTRAINT elasticsearch_indexed_namespaces_pkey PRIMARY KEY (namespace_id); +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); -ALTER TABLE ONLY elasticsearch_indexed_projects - ADD CONSTRAINT elasticsearch_indexed_projects_pkey PRIMARY KEY (project_id); +CREATE INDEX idx_projects_on_repository_storage_last_repository_updated_at ON projects USING btree (id, repository_storage, last_repository_updated_at); -ALTER TABLE ONLY emails - ADD CONSTRAINT emails_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_protected_branch_id_external_approval_rule_id ON external_approval_rules_protected_branches USING btree (protected_branch_id, external_approval_rule_id); -ALTER TABLE ONLY environments - ADD CONSTRAINT environments_pkey PRIMARY KEY (id); +CREATE INDEX idx_repository_states_on_last_repository_verification_ran_at ON project_repository_states USING btree (project_id, last_repository_verification_ran_at) WHERE ((repository_verification_checksum IS NOT NULL) AND (last_repository_verification_failure IS NULL)); -ALTER TABLE ONLY epic_issues - ADD CONSTRAINT epic_issues_pkey PRIMARY KEY (id); +CREATE INDEX idx_repository_states_on_last_wiki_verification_ran_at ON project_repository_states USING btree (project_id, last_wiki_verification_ran_at) WHERE ((wiki_verification_checksum IS NOT NULL) AND (last_wiki_verification_failure IS NULL)); -ALTER TABLE ONLY epic_metrics - ADD CONSTRAINT epic_metrics_pkey PRIMARY KEY (id); +CREATE INDEX idx_repository_states_on_repository_failure_partial ON project_repository_states USING btree (last_repository_verification_failure) WHERE (last_repository_verification_failure IS NOT NULL); -ALTER TABLE ONLY epic_user_mentions - ADD CONSTRAINT epic_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX idx_repository_states_on_wiki_failure_partial ON project_repository_states USING btree (last_wiki_verification_failure) WHERE (last_wiki_verification_failure IS NOT NULL); -ALTER TABLE ONLY epics - ADD CONSTRAINT epics_pkey PRIMARY KEY (id); +CREATE INDEX idx_repository_states_outdated_checksums ON project_repository_states USING btree (project_id) WHERE (((repository_verification_checksum IS NULL) AND (last_repository_verification_failure IS NULL)) OR ((wiki_verification_checksum IS NULL) AND (last_wiki_verification_failure IS NULL))); -ALTER TABLE ONLY error_tracking_client_keys - ADD CONSTRAINT error_tracking_client_keys_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_security_scans_on_build_and_scan_type ON security_scans USING btree (build_id, scan_type); -ALTER TABLE ONLY error_tracking_error_events - ADD CONSTRAINT error_tracking_error_events_pkey PRIMARY KEY (id); +CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan_type); -ALTER TABLE ONLY error_tracking_errors - ADD CONSTRAINT error_tracking_errors_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id); -ALTER TABLE ONLY events - ADD CONSTRAINT events_pkey PRIMARY KEY (id); +CREATE INDEX idx_user_details_on_provisioned_by_group_id_user_id ON user_details USING btree (provisioned_by_group_id, user_id); -ALTER TABLE ONLY evidences - ADD CONSTRAINT evidences_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vuln_signatures_on_occurrences_id_and_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, signature_sha); -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vuln_signatures_uniqueness_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, algorithm_type, signature_sha); -ALTER TABLE ONLY experiment_users - ADD CONSTRAINT experiment_users_pkey PRIMARY KEY (id); +CREATE INDEX idx_vulnerabilities_partial_devops_adoption ON vulnerabilities USING btree (project_id, created_at) WHERE (state <> 1); -ALTER TABLE ONLY experiments - ADD CONSTRAINT experiments_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue ON vulnerability_external_issue_links USING btree (vulnerability_id, external_type, external_project_key, external_issue_key); -ALTER TABLE ONLY external_approval_rules - ADD CONSTRAINT external_approval_rules_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_link_type ON vulnerability_external_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 1); -ALTER TABLE ONLY external_approval_rules_protected_branches - ADD CONSTRAINT external_approval_rules_protected_branches_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_issue_id ON vulnerability_issue_links USING btree (vulnerability_id, issue_id); -ALTER TABLE ONLY external_pull_requests - ADD CONSTRAINT external_pull_requests_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_link_type ON vulnerability_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 2); -ALTER TABLE ONLY external_status_checks - ADD CONSTRAINT external_status_checks_pkey PRIMARY KEY (id); +CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id); -ALTER TABLE ONLY external_status_checks_protected_branches - ADD CONSTRAINT external_status_checks_protected_branches_pkey PRIMARY KEY (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); -ALTER TABLE ONLY feature_gates - ADD CONSTRAINT feature_gates_pkey PRIMARY KEY (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); -ALTER TABLE ONLY features - ADD CONSTRAINT features_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY fork_network_members - ADD CONSTRAINT fork_network_members_pkey PRIMARY KEY (id); +CREATE INDEX index_agent_activity_events_on_project_id ON agent_activity_events USING btree (project_id) WHERE (project_id IS NOT NULL); -ALTER TABLE ONLY fork_networks - ADD CONSTRAINT fork_networks_pkey PRIMARY KEY (id); +CREATE INDEX index_agent_activity_events_on_user_id ON agent_activity_events USING btree (user_id) WHERE (user_id IS NOT NULL); -ALTER TABLE ONLY geo_cache_invalidation_events - ADD CONSTRAINT geo_cache_invalidation_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_agent_group_authorizations_on_agent_id_and_group_id ON agent_group_authorizations USING btree (agent_id, group_id); -ALTER TABLE ONLY geo_container_repository_updated_events - ADD CONSTRAINT geo_container_repository_updated_events_pkey PRIMARY KEY (id); +CREATE INDEX index_agent_group_authorizations_on_group_id ON agent_group_authorizations USING btree (group_id); -ALTER TABLE ONLY geo_event_log - ADD CONSTRAINT geo_event_log_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_agent_project_authorizations_on_agent_id_and_project_id ON agent_project_authorizations USING btree (agent_id, project_id); -ALTER TABLE ONLY geo_events - ADD CONSTRAINT geo_events_pkey PRIMARY KEY (id); +CREATE INDEX index_agent_project_authorizations_on_project_id ON agent_project_authorizations USING btree (project_id); -ALTER TABLE ONLY geo_hashed_storage_attachments_events - ADD CONSTRAINT geo_hashed_storage_attachments_events_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id); -ALTER TABLE ONLY geo_hashed_storage_migrated_events - ADD CONSTRAINT geo_hashed_storage_migrated_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON alert_management_alert_assignees USING btree (user_id, alert_id); -ALTER TABLE ONLY geo_job_artifact_deleted_events - ADD CONSTRAINT geo_job_artifact_deleted_events_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_alert_metric_images_on_alert_id ON alert_management_alert_metric_images USING btree (alert_id); -ALTER TABLE ONLY geo_lfs_object_deleted_events - ADD CONSTRAINT geo_lfs_object_deleted_events_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_alerts_on_domain ON alert_management_alerts USING btree (domain); -ALTER TABLE ONLY geo_node_namespace_links - ADD CONSTRAINT geo_node_namespace_links_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_alerts_on_environment_id ON alert_management_alerts USING btree (environment_id) WHERE (environment_id IS NOT NULL); -ALTER TABLE ONLY geo_node_statuses - ADD CONSTRAINT geo_node_statuses_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_alerts_on_issue_id ON alert_management_alerts USING btree (issue_id); -ALTER TABLE ONLY geo_nodes - ADD CONSTRAINT geo_nodes_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_alert_management_alerts_on_project_id_and_iid ON alert_management_alerts USING btree (project_id, iid); -ALTER TABLE ONLY geo_repositories_changed_events - ADD CONSTRAINT geo_repositories_changed_events_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_alerts_on_prometheus_alert_id ON alert_management_alerts USING btree (prometheus_alert_id) WHERE (prometheus_alert_id IS NOT NULL); -ALTER TABLE ONLY geo_repository_created_events - ADD CONSTRAINT geo_repository_created_events_pkey PRIMARY KEY (id); +CREATE INDEX index_alert_management_http_integrations_on_project_id ON alert_management_http_integrations USING btree (project_id); -ALTER TABLE ONLY geo_repository_deleted_events - ADD CONSTRAINT geo_repository_deleted_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id) WHERE (note_id IS NULL); -ALTER TABLE ONLY geo_repository_renamed_events - ADD CONSTRAINT geo_repository_renamed_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id_and_note_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id, note_id); -ALTER TABLE ONLY geo_repository_updated_events - ADD CONSTRAINT geo_repository_updated_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_alert_user_mentions_on_note_id ON alert_management_alert_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); -ALTER TABLE ONLY geo_reset_checksum_events - ADD CONSTRAINT geo_reset_checksum_events_pkey PRIMARY KEY (id); +CREATE INDEX index_allowed_email_domains_on_group_id ON allowed_email_domains USING btree (group_id); -ALTER TABLE ONLY geo_upload_deleted_events - ADD CONSTRAINT geo_upload_deleted_events_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_group_stages_on_end_event_label_id ON analytics_cycle_analytics_group_stages USING btree (end_event_label_id); -ALTER TABLE ONLY gitlab_subscription_histories - ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_group_stages_on_group_id ON analytics_cycle_analytics_group_stages USING btree (group_id); -ALTER TABLE ONLY gitlab_subscriptions - ADD CONSTRAINT gitlab_subscriptions_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_group_stages_on_relative_position ON analytics_cycle_analytics_group_stages USING btree (relative_position); -ALTER TABLE ONLY gpg_key_subkeys - ADD CONSTRAINT gpg_key_subkeys_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_group_stages_on_start_event_label_id ON analytics_cycle_analytics_group_stages USING btree (start_event_label_id); -ALTER TABLE ONLY gpg_keys - ADD CONSTRAINT gpg_keys_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_group_stages_on_value_stream_id ON analytics_cycle_analytics_group_stages USING btree (group_value_stream_id); -ALTER TABLE ONLY gpg_signatures - ADD CONSTRAINT gpg_signatures_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_analytics_ca_group_value_streams_on_group_id_and_name ON analytics_cycle_analytics_group_value_streams USING btree (group_id, name); -ALTER TABLE ONLY grafana_integrations - ADD CONSTRAINT grafana_integrations_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_project_stages_on_end_event_label_id ON analytics_cycle_analytics_project_stages USING btree (end_event_label_id); -ALTER TABLE ONLY group_custom_attributes - ADD CONSTRAINT group_custom_attributes_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_project_stages_on_project_id ON analytics_cycle_analytics_project_stages USING btree (project_id); -ALTER TABLE ONLY group_deletion_schedules - ADD CONSTRAINT group_deletion_schedules_pkey PRIMARY KEY (group_id); +CREATE UNIQUE INDEX index_analytics_ca_project_stages_on_project_id_and_name ON analytics_cycle_analytics_project_stages USING btree (project_id, name); -ALTER TABLE ONLY group_deploy_keys_groups - ADD CONSTRAINT group_deploy_keys_groups_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_project_stages_on_relative_position ON analytics_cycle_analytics_project_stages USING btree (relative_position); -ALTER TABLE ONLY group_deploy_keys - ADD CONSTRAINT group_deploy_keys_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_project_stages_on_start_event_label_id ON analytics_cycle_analytics_project_stages USING btree (start_event_label_id); -ALTER TABLE ONLY group_deploy_tokens - ADD CONSTRAINT group_deploy_tokens_pkey PRIMARY KEY (id); +CREATE INDEX index_analytics_ca_project_stages_on_value_stream_id ON analytics_cycle_analytics_project_stages USING btree (project_value_stream_id); -ALTER TABLE ONLY group_group_links - ADD CONSTRAINT group_group_links_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_analytics_ca_project_value_streams_on_project_id_and_name ON analytics_cycle_analytics_project_value_streams USING btree (project_id, name); -ALTER TABLE ONLY group_import_states - ADD CONSTRAINT group_import_states_pkey PRIMARY KEY (group_id); +CREATE INDEX index_analytics_cycle_analytics_group_stages_custom_only ON analytics_cycle_analytics_group_stages USING btree (id) WHERE (custom = true); -ALTER TABLE ONLY group_merge_request_approval_settings - ADD CONSTRAINT group_merge_request_approval_settings_pkey PRIMARY KEY (group_id); +CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON application_settings USING btree (custom_project_templates_group_id); -ALTER TABLE ONLY group_repository_storage_moves - ADD CONSTRAINT group_repository_storage_moves_pkey PRIMARY KEY (id); +CREATE INDEX index_application_settings_on_file_template_project_id ON application_settings USING btree (file_template_project_id); -ALTER TABLE ONLY group_wiki_repositories - ADD CONSTRAINT group_wiki_repositories_pkey PRIMARY KEY (group_id); +CREATE INDEX index_application_settings_on_instance_administrators_group_id ON application_settings USING btree (instance_administrators_group_id); -ALTER TABLE ONLY historical_data - ADD CONSTRAINT historical_data_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_application_settings_on_push_rule_id ON application_settings USING btree (push_rule_id); -ALTER TABLE ONLY identities - ADD CONSTRAINT identities_pkey PRIMARY KEY (id); +CREATE INDEX index_application_settings_on_usage_stats_set_by_user_id ON application_settings USING btree (usage_stats_set_by_user_id); -ALTER TABLE ONLY import_export_uploads - ADD CONSTRAINT import_export_uploads_pkey PRIMARY KEY (id); +CREATE INDEX index_applicationsettings_on_instance_administration_project_id ON application_settings USING btree (instance_administration_project_id); -ALTER TABLE ONLY import_failures - ADD CONSTRAINT import_failures_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approval_merge_request_rule_sources_1 ON approval_merge_request_rule_sources USING btree (approval_merge_request_rule_id); -ALTER TABLE ONLY in_product_marketing_emails - ADD CONSTRAINT in_product_marketing_emails_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_merge_request_rule_sources_2 ON approval_merge_request_rule_sources USING btree (approval_project_rule_id); -ALTER TABLE ONLY incident_management_oncall_shifts - ADD CONSTRAINT inc_mgmnt_no_overlapping_oncall_shifts EXCLUDE USING gist (rotation_id WITH =, tstzrange(starts_at, ends_at, '[)'::text) WITH &&); +CREATE UNIQUE INDEX index_approval_merge_request_rules_approved_approvers_1 ON approval_merge_request_rules_approved_approvers USING btree (approval_merge_request_rule_id, user_id); -ALTER TABLE ONLY incident_management_escalation_policies - ADD CONSTRAINT incident_management_escalation_policies_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_merge_request_rules_approved_approvers_2 ON approval_merge_request_rules_approved_approvers USING btree (user_id); -ALTER TABLE ONLY incident_management_escalation_rules - ADD CONSTRAINT incident_management_escalation_rules_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approval_merge_request_rules_groups_1 ON approval_merge_request_rules_groups USING btree (approval_merge_request_rule_id, group_id); -ALTER TABLE ONLY incident_management_issuable_escalation_statuses - ADD CONSTRAINT incident_management_issuable_escalation_statuses_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_merge_request_rules_groups_2 ON approval_merge_request_rules_groups USING btree (group_id); -ALTER TABLE ONLY incident_management_oncall_participants - ADD CONSTRAINT incident_management_oncall_participants_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approval_merge_request_rules_users_1 ON approval_merge_request_rules_users USING btree (approval_merge_request_rule_id, user_id); -ALTER TABLE ONLY incident_management_oncall_rotations - ADD CONSTRAINT incident_management_oncall_rotations_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_merge_request_rules_users_2 ON approval_merge_request_rules_users USING btree (user_id); -ALTER TABLE ONLY incident_management_oncall_schedules - ADD CONSTRAINT incident_management_oncall_schedules_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approval_project_rules_groups_1 ON approval_project_rules_groups USING btree (approval_project_rule_id, group_id); -ALTER TABLE ONLY incident_management_oncall_shifts - ADD CONSTRAINT incident_management_oncall_shifts_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_groups_2 ON approval_project_rules_groups USING btree (group_id); -ALTER TABLE ONLY index_statuses - ADD CONSTRAINT index_statuses_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_on_id_with_regular_type ON approval_project_rules USING btree (id) WHERE (rule_type = 0); -ALTER TABLE ONLY insights - ADD CONSTRAINT insights_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_on_project_id ON approval_project_rules USING btree (project_id); -ALTER TABLE ONLY integrations - ADD CONSTRAINT integrations_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_on_rule_type ON approval_project_rules USING btree (rule_type); -ALTER TABLE ONLY internal_ids - ADD CONSTRAINT internal_ids_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_protected_branches_pb_id ON approval_project_rules_protected_branches USING btree (protected_branch_id); -ALTER TABLE ONLY ip_restrictions - ADD CONSTRAINT ip_restrictions_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_report_type ON approval_project_rules USING btree (report_type); -ALTER TABLE ONLY issuable_metric_images - ADD CONSTRAINT issuable_metric_images_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approval_project_rules_users_1 ON approval_project_rules_users USING btree (approval_project_rule_id, user_id); -ALTER TABLE ONLY issuable_severities - ADD CONSTRAINT issuable_severities_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_users_2 ON approval_project_rules_users USING btree (user_id); -ALTER TABLE ONLY issuable_slas - ADD CONSTRAINT issuable_slas_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_project_rules_users_on_approval_project_rule_id ON approval_project_rules_users USING btree (approval_project_rule_id); -ALTER TABLE ONLY issue_assignees - ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_id, user_id); +CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, name) WHERE ((rule_type = 2) AND (section IS NULL)); -ALTER TABLE ONLY issue_email_participants - ADD CONSTRAINT issue_email_participants_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY issue_links - ADD CONSTRAINT issue_links_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_rule_on_protected_environment_id ON protected_environment_approval_rules USING btree (protected_environment_id); -ALTER TABLE ONLY issue_metrics - ADD CONSTRAINT issue_metrics_pkey PRIMARY KEY (id); +CREATE INDEX index_approval_rules_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id) WHERE (rule_type = 2); -ALTER TABLE ONLY issue_tracker_data - ADD CONSTRAINT issue_tracker_data_pkey PRIMARY KEY (id); +CREATE INDEX index_approvals_on_merge_request_id ON approvals USING btree (merge_request_id); -ALTER TABLE ONLY issue_user_mentions - ADD CONSTRAINT issue_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX index_approvals_on_merge_request_id_and_created_at ON approvals USING btree (merge_request_id, created_at); -ALTER TABLE ONLY issues - ADD CONSTRAINT issues_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_approvals_on_user_id_and_merge_request_id ON approvals USING btree (user_id, merge_request_id); -ALTER TABLE ONLY issues_prometheus_alert_events - ADD CONSTRAINT issues_prometheus_alert_events_pkey PRIMARY KEY (issue_id, prometheus_alert_event_id); +CREATE INDEX index_approver_groups_on_group_id ON approver_groups USING btree (group_id); -ALTER TABLE ONLY issues_self_managed_prometheus_alert_events - ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id); +CREATE INDEX index_approver_groups_on_target_id_and_target_type ON approver_groups USING btree (target_id, target_type); -ALTER TABLE ONLY sprints - ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint EXCLUDE USING gist (iterations_cadence_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((group_id IS NOT NULL)); +CREATE INDEX index_approvers_on_target_id_and_target_type ON approvers USING btree (target_id, target_type); -ALTER TABLE ONLY sprints - ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((project_id IS NOT NULL)); +CREATE INDEX index_approvers_on_user_id ON approvers USING btree (user_id); -ALTER TABLE ONLY iterations_cadences - ADD CONSTRAINT iterations_cadences_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_atlassian_identities_on_extern_uid ON atlassian_identities USING btree (extern_uid); -ALTER TABLE ONLY jira_connect_installations - ADD CONSTRAINT jira_connect_installations_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_audit_events_external_audit_on_verification_token ON audit_events_external_audit_event_destinations USING btree (verification_token); -ALTER TABLE ONLY jira_connect_subscriptions - ADD CONSTRAINT jira_connect_subscriptions_pkey PRIMARY KEY (id); +CREATE INDEX index_authentication_events_on_provider ON authentication_events USING btree (provider); -ALTER TABLE ONLY jira_imports - ADD CONSTRAINT jira_imports_pkey PRIMARY KEY (id); +CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1); -ALTER TABLE ONLY jira_tracker_data - ADD CONSTRAINT jira_tracker_data_pkey PRIMARY KEY (id); +CREATE INDEX index_authentication_events_on_user_id ON authentication_events USING btree (user_id); -ALTER TABLE ONLY keys - ADD CONSTRAINT keys_pkey PRIMARY KEY (id); +CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON award_emoji USING btree (awardable_type, awardable_id); -ALTER TABLE ONLY label_links - ADD CONSTRAINT label_links_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON aws_roles USING btree (role_external_id); -ALTER TABLE ONLY label_priorities - ADD CONSTRAINT label_priorities_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_aws_roles_on_user_id ON aws_roles USING btree (user_id); -ALTER TABLE ONLY labels - ADD CONSTRAINT labels_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY ldap_group_links - ADD CONSTRAINT ldap_group_links_pkey PRIMARY KEY (id); +CREATE INDEX index_background_migration_jobs_on_class_name_and_status_and_id ON background_migration_jobs USING btree (class_name, status, id); -ALTER TABLE ONLY lfs_file_locks - ADD CONSTRAINT lfs_file_locks_pkey PRIMARY KEY (id); +CREATE INDEX index_badges_on_group_id ON badges USING btree (group_id); -ALTER TABLE ONLY lfs_objects - ADD CONSTRAINT lfs_objects_pkey PRIMARY KEY (id); +CREATE INDEX index_badges_on_project_id ON badges USING btree (project_id); -ALTER TABLE ONLY lfs_objects_projects - ADD CONSTRAINT lfs_objects_projects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_batched_background_migrations_on_unique_configuration ON batched_background_migrations USING btree (job_class_name, table_name, column_name, job_arguments); -ALTER TABLE ONLY licenses - ADD CONSTRAINT licenses_pkey PRIMARY KEY (id); +CREATE INDEX index_batched_jobs_by_batched_migration_id_and_id ON batched_background_migration_jobs USING btree (batched_background_migration_id, id); -ALTER TABLE ONLY list_user_preferences - ADD CONSTRAINT list_user_preferences_pkey PRIMARY KEY (id); +CREATE INDEX index_batched_jobs_on_batched_migration_id_and_status ON batched_background_migration_jobs USING btree (batched_background_migration_id, status); -ALTER TABLE ONLY lists - ADD CONSTRAINT lists_pkey PRIMARY KEY (id); +CREATE INDEX index_board_assignees_on_assignee_id ON board_assignees USING btree (assignee_id); -ALTER TABLE ONLY members - ADD CONSTRAINT members_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_board_assignees_on_board_id_and_assignee_id ON board_assignees USING btree (board_id, assignee_id); -ALTER TABLE ONLY merge_request_assignees - ADD CONSTRAINT merge_request_assignees_pkey PRIMARY KEY (id); +CREATE INDEX index_board_group_recent_visits_on_board_id ON board_group_recent_visits USING btree (board_id); -ALTER TABLE ONLY merge_request_blocks - ADD CONSTRAINT merge_request_blocks_pkey PRIMARY KEY (id); +CREATE INDEX index_board_group_recent_visits_on_group_id ON board_group_recent_visits USING btree (group_id); -ALTER TABLE ONLY merge_request_cleanup_schedules - ADD CONSTRAINT merge_request_cleanup_schedules_pkey PRIMARY KEY (merge_request_id); +CREATE UNIQUE INDEX index_board_group_recent_visits_on_user_group_and_board ON board_group_recent_visits USING btree (user_id, group_id, board_id); -ALTER TABLE ONLY merge_request_context_commit_diff_files - ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order); +CREATE INDEX index_board_group_recent_visits_on_user_id ON board_group_recent_visits USING btree (user_id); -ALTER TABLE ONLY merge_request_context_commits - ADD CONSTRAINT merge_request_context_commits_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_board_labels_on_board_id_and_label_id ON board_labels USING btree (board_id, label_id); -ALTER TABLE ONLY merge_request_diff_commit_users - ADD CONSTRAINT merge_request_diff_commit_users_pkey PRIMARY KEY (id); +CREATE INDEX index_board_labels_on_label_id ON board_labels USING btree (label_id); -ALTER TABLE ONLY merge_request_diff_commits - ADD CONSTRAINT merge_request_diff_commits_pkey PRIMARY KEY (merge_request_diff_id, relative_order); +CREATE INDEX index_board_project_recent_visits_on_board_id ON board_project_recent_visits USING btree (board_id); -ALTER TABLE ONLY merge_request_diff_details - ADD CONSTRAINT merge_request_diff_details_pkey PRIMARY KEY (merge_request_diff_id); +CREATE INDEX index_board_project_recent_visits_on_project_id ON board_project_recent_visits USING btree (project_id); -ALTER TABLE ONLY merge_request_diff_files - ADD CONSTRAINT merge_request_diff_files_pkey PRIMARY KEY (merge_request_diff_id, relative_order); +CREATE INDEX index_board_project_recent_visits_on_user_id ON board_project_recent_visits USING btree (user_id); -ALTER TABLE ONLY merge_request_diffs - ADD CONSTRAINT merge_request_diffs_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_board_project_recent_visits_on_user_project_and_board ON board_project_recent_visits USING btree (user_id, project_id, board_id); -ALTER TABLE ONLY merge_request_metrics - ADD CONSTRAINT merge_request_metrics_pkey PRIMARY KEY (id); +CREATE INDEX index_board_user_preferences_on_board_id ON board_user_preferences USING btree (board_id); -ALTER TABLE ONLY merge_request_reviewers - ADD CONSTRAINT merge_request_reviewers_pkey PRIMARY KEY (id); +CREATE INDEX index_board_user_preferences_on_user_id ON board_user_preferences USING btree (user_id); -ALTER TABLE ONLY merge_request_user_mentions - ADD CONSTRAINT merge_request_user_mentions_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_board_user_preferences_on_user_id_and_board_id ON board_user_preferences USING btree (user_id, board_id); -ALTER TABLE ONLY merge_requests_closing_issues - ADD CONSTRAINT merge_requests_closing_issues_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_labels_on_epic_board_id ON boards_epic_board_labels USING btree (epic_board_id); -ALTER TABLE ONLY merge_requests - ADD CONSTRAINT merge_requests_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_labels_on_label_id ON boards_epic_board_labels USING btree (label_id); -ALTER TABLE ONLY merge_trains - ADD CONSTRAINT merge_trains_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_boards_epic_board_positions_on_epic_board_id_and_epic_id ON boards_epic_board_positions USING btree (epic_board_id, epic_id); -ALTER TABLE ONLY metrics_dashboard_annotations - ADD CONSTRAINT metrics_dashboard_annotations_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_positions_on_epic_id ON boards_epic_board_positions USING btree (epic_id); -ALTER TABLE ONLY metrics_users_starred_dashboards - ADD CONSTRAINT metrics_users_starred_dashboards_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_positions_on_scoped_relative_position ON boards_epic_board_positions USING btree (epic_board_id, epic_id, relative_position); -ALTER TABLE ONLY milestone_releases - ADD CONSTRAINT milestone_releases_pkey PRIMARY KEY (milestone_id, release_id); +CREATE INDEX index_boards_epic_board_recent_visits_on_epic_board_id ON boards_epic_board_recent_visits USING btree (epic_board_id); -ALTER TABLE ONLY milestones - ADD CONSTRAINT milestones_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_recent_visits_on_group_id ON boards_epic_board_recent_visits USING btree (group_id); -ALTER TABLE ONLY namespace_admin_notes - ADD CONSTRAINT namespace_admin_notes_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_board_recent_visits_on_user_id ON boards_epic_board_recent_visits USING btree (user_id); -ALTER TABLE ONLY namespace_aggregation_schedules - ADD CONSTRAINT namespace_aggregation_schedules_pkey PRIMARY KEY (namespace_id); +CREATE INDEX index_boards_epic_boards_on_group_id ON boards_epic_boards USING btree (group_id); -ALTER TABLE ONLY namespace_limits - ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id); +CREATE INDEX index_boards_epic_list_user_preferences_on_epic_list_id ON boards_epic_list_user_preferences USING btree (epic_list_id); -ALTER TABLE ONLY namespace_package_settings - ADD CONSTRAINT namespace_package_settings_pkey PRIMARY KEY (namespace_id); +CREATE INDEX index_boards_epic_lists_on_epic_board_id ON boards_epic_lists USING btree (epic_board_id); -ALTER TABLE ONLY namespace_root_storage_statistics - ADD CONSTRAINT namespace_root_storage_statistics_pkey PRIMARY KEY (namespace_id); +CREATE UNIQUE INDEX index_boards_epic_lists_on_epic_board_id_and_label_id ON boards_epic_lists USING btree (epic_board_id, label_id) WHERE (list_type = 1); -ALTER TABLE ONLY namespace_settings - ADD CONSTRAINT namespace_settings_pkey PRIMARY KEY (namespace_id); +CREATE INDEX index_boards_epic_lists_on_label_id ON boards_epic_lists USING btree (label_id); -ALTER TABLE ONLY namespace_statistics - ADD CONSTRAINT namespace_statistics_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_user_preferences_on_board_id ON boards_epic_user_preferences USING btree (board_id); -ALTER TABLE ONLY namespaces - ADD CONSTRAINT namespaces_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_boards_epic_user_preferences_on_board_user_epic_unique ON boards_epic_user_preferences USING btree (board_id, user_id, epic_id); -ALTER TABLE ONLY note_diff_files - ADD CONSTRAINT note_diff_files_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_user_preferences_on_epic_id ON boards_epic_user_preferences USING btree (epic_id); -ALTER TABLE ONLY notes - ADD CONSTRAINT notes_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_epic_user_preferences_on_user_id ON boards_epic_user_preferences USING btree (user_id); -ALTER TABLE ONLY notification_settings - ADD CONSTRAINT notification_settings_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_on_group_id ON boards USING btree (group_id); -ALTER TABLE ONLY oauth_access_grants - ADD CONSTRAINT oauth_access_grants_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_on_iteration_cadence_id ON boards USING btree (iteration_cadence_id); -ALTER TABLE ONLY oauth_access_tokens - ADD CONSTRAINT oauth_access_tokens_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_on_iteration_id ON boards USING btree (iteration_id); -ALTER TABLE ONLY oauth_applications - ADD CONSTRAINT oauth_applications_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_on_milestone_id ON boards USING btree (milestone_id); -ALTER TABLE ONLY oauth_openid_requests - ADD CONSTRAINT oauth_openid_requests_pkey PRIMARY KEY (id); +CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); -ALTER TABLE ONLY onboarding_progresses - ADD CONSTRAINT onboarding_progresses_pkey PRIMARY KEY (id); +CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id); -ALTER TABLE ONLY open_project_tracker_data - ADD CONSTRAINT open_project_tracker_data_pkey PRIMARY KEY (id); +CREATE INDEX index_btree_namespaces_traversal_ids ON namespaces USING btree (traversal_ids); -ALTER TABLE ONLY operations_feature_flag_scopes - ADD CONSTRAINT operations_feature_flag_scopes_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); -ALTER TABLE ONLY operations_feature_flags_clients - ADD CONSTRAINT operations_feature_flags_clients_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status); -ALTER TABLE ONLY operations_feature_flags_issues - ADD CONSTRAINT operations_feature_flags_issues_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_entities_on_namespace_id ON bulk_import_entities USING btree (namespace_id); -ALTER TABLE ONLY operations_feature_flags - ADD CONSTRAINT operations_feature_flags_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_entities_on_parent_id ON bulk_import_entities USING btree (parent_id); -ALTER TABLE ONLY operations_scopes - ADD CONSTRAINT operations_scopes_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_entities_on_project_id ON bulk_import_entities USING btree (project_id); -ALTER TABLE ONLY operations_strategies - ADD CONSTRAINT operations_strategies_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_export_uploads_on_export_id ON bulk_import_export_uploads USING btree (export_id); -ALTER TABLE ONLY operations_strategies_user_lists - ADD CONSTRAINT operations_strategies_user_lists_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_failures_on_bulk_import_entity_id ON bulk_import_failures USING btree (bulk_import_entity_id); -ALTER TABLE ONLY operations_user_lists - ADD CONSTRAINT operations_user_lists_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_failures USING btree (correlation_id_value); -ALTER TABLE ONLY packages_build_infos - ADD CONSTRAINT packages_build_infos_pkey PRIMARY KEY (id); +CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id); -ALTER TABLE ONLY packages_composer_cache_files - ADD CONSTRAINT packages_composer_cache_files_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_chat_names_on_service_id_and_team_id_and_chat_id ON chat_names USING btree (service_id, team_id, chat_id); -ALTER TABLE ONLY packages_composer_metadata - ADD CONSTRAINT packages_composer_metadata_pkey PRIMARY KEY (package_id); +CREATE UNIQUE INDEX index_chat_names_on_user_id_and_service_id ON chat_names USING btree (user_id, service_id); -ALTER TABLE ONLY packages_conan_file_metadata - ADD CONSTRAINT packages_conan_file_metadata_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_chat_teams_on_namespace_id ON chat_teams USING btree (namespace_id); -ALTER TABLE ONLY packages_conan_metadata - ADD CONSTRAINT packages_conan_metadata_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_build_needs_on_build_id_and_name ON ci_build_needs USING btree (build_id, name); -ALTER TABLE ONLY packages_debian_file_metadata - ADD CONSTRAINT packages_debian_file_metadata_pkey PRIMARY KEY (package_file_id); +CREATE UNIQUE INDEX index_ci_build_pending_states_on_build_id ON ci_build_pending_states USING btree (build_id); -ALTER TABLE ONLY packages_debian_group_architectures - ADD CONSTRAINT packages_debian_group_architectures_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_build_report_results_on_project_id ON ci_build_report_results USING btree (project_id); -ALTER TABLE ONLY packages_debian_group_component_files - ADD CONSTRAINT packages_debian_group_component_files_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON ci_build_trace_chunks USING btree (build_id, chunk_index); -ALTER TABLE ONLY packages_debian_group_components - ADD CONSTRAINT packages_debian_group_components_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id); -ALTER TABLE ONLY packages_debian_group_distribution_keys - ADD CONSTRAINT packages_debian_group_distribution_keys_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id ON ci_builds_metadata USING btree (build_id); -ALTER TABLE ONLY packages_debian_group_distributions - ADD CONSTRAINT packages_debian_group_distributions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts ON ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE); -ALTER TABLE ONLY packages_debian_project_architectures - ADD CONSTRAINT packages_debian_project_architectures_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_metadata_on_build_id_and_id_and_interruptible ON ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true); -ALTER TABLE ONLY packages_debian_project_component_files - ADD CONSTRAINT packages_debian_project_component_files_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_metadata_on_project_id ON ci_builds_metadata USING btree (project_id); -ALTER TABLE ONLY packages_debian_project_components - ADD CONSTRAINT packages_debian_project_components_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_auto_canceled_by_id ON ci_builds USING btree (auto_canceled_by_id); -ALTER TABLE ONLY packages_debian_project_distribution_keys - ADD CONSTRAINT packages_debian_project_distribution_keys_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_commit_id_and_stage_idx_and_created_at ON ci_builds USING btree (commit_id, stage_idx, created_at); -ALTER TABLE ONLY packages_debian_project_distributions - ADD CONSTRAINT packages_debian_project_distributions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_commit_id_and_status_and_type ON ci_builds USING btree (commit_id, status, type); -ALTER TABLE ONLY packages_debian_publications - ADD CONSTRAINT packages_debian_publications_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_commit_id_and_type_and_name_and_ref ON ci_builds USING btree (commit_id, type, name, ref); -ALTER TABLE ONLY packages_dependencies - ADD CONSTRAINT packages_dependencies_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_commit_id_and_type_and_ref ON ci_builds USING btree (commit_id, type, ref); -ALTER TABLE ONLY packages_dependency_links - ADD CONSTRAINT packages_dependency_links_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_commit_id_artifacts_expired_at_and_id ON ci_builds USING btree (commit_id, artifacts_expire_at, id) WHERE (((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('dependency_scanning'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text]))); -ALTER TABLE ONLY packages_events - ADD CONSTRAINT packages_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (project_id, id); -ALTER TABLE ONLY packages_helm_file_metadata - ADD CONSTRAINT packages_helm_file_metadata_pkey PRIMARY KEY (package_file_id); +CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL))); -ALTER TABLE ONLY packages_maven_metadata - ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_builds USING btree (project_id) WHERE (((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND ((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text)); -ALTER TABLE ONLY packages_nuget_dependency_link_metadata - ADD CONSTRAINT packages_nuget_dependency_link_metadata_pkey PRIMARY KEY (dependency_link_id); +CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at); -ALTER TABLE ONLY packages_nuget_metadata - ADD CONSTRAINT packages_nuget_metadata_pkey PRIMARY KEY (package_id); +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); -ALTER TABLE ONLY packages_package_file_build_infos - ADD CONSTRAINT packages_package_file_build_infos_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC); -ALTER TABLE ONLY packages_package_files - ADD CONSTRAINT packages_package_files_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id); -ALTER TABLE ONLY packages_packages - ADD CONSTRAINT packages_packages_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_status_and_type_and_runner_id ON ci_builds USING btree (status, type, runner_id); -ALTER TABLE ONLY packages_pypi_metadata - ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id); +CREATE UNIQUE INDEX index_ci_builds_on_token_encrypted ON ci_builds USING btree (token_encrypted) WHERE (token_encrypted IS NOT NULL); -ALTER TABLE ONLY packages_rubygems_metadata - ADD CONSTRAINT packages_rubygems_metadata_pkey PRIMARY KEY (package_id); +CREATE UNIQUE INDEX index_ci_builds_on_token_partial ON ci_builds USING btree (token) WHERE (token IS NOT NULL); -ALTER TABLE ONLY packages_tags - ADD CONSTRAINT packages_tags_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_updated_at ON ci_builds USING btree (updated_at); -ALTER TABLE ONLY pages_deployments - ADD CONSTRAINT pages_deployments_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_upstream_pipeline_id ON ci_builds USING btree (upstream_pipeline_id) WHERE (upstream_pipeline_id IS NOT NULL); -ALTER TABLE ONLY pages_domain_acme_orders - ADD CONSTRAINT pages_domain_acme_orders_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_user_id ON ci_builds USING btree (user_id); -ALTER TABLE ONLY pages_domains - ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_on_user_id_and_created_at_and_type_eq_ci_build ON ci_builds USING btree (user_id, created_at) WHERE ((type)::text = 'Ci::Build'::text); -ALTER TABLE ONLY partitioned_foreign_keys - ADD CONSTRAINT partitioned_foreign_keys_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_project_id_and_status_for_live_jobs_partial2 ON ci_builds USING btree (project_id, status) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text]))); -ALTER TABLE ONLY path_locks - ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_runner_id_pending_covering ON ci_builds USING btree (runner_id, id) INCLUDE (project_id) WHERE (((status)::text = 'pending'::text) AND ((type)::text = 'Ci::Build'::text)); -ALTER TABLE ONLY personal_access_tokens - ADD CONSTRAINT personal_access_tokens_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_builds_runner_id_running ON ci_builds USING btree (runner_id) WHERE (((status)::text = 'running'::text) AND ((type)::text = 'Ci::Build'::text)); -ALTER TABLE ONLY plan_limits - ADD CONSTRAINT plan_limits_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON ci_builds_runner_session USING btree (build_id); -ALTER TABLE ONLY plans - ADD CONSTRAINT plans_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_daily_build_group_report_results_on_group_id ON ci_daily_build_group_report_results USING btree (group_id); -ALTER TABLE ONLY pool_repositories - ADD CONSTRAINT pool_repositories_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_daily_build_group_report_results_on_last_pipeline_id ON ci_daily_build_group_report_results USING btree (last_pipeline_id); -ALTER TABLE ONLY postgres_async_indexes - ADD CONSTRAINT postgres_async_indexes_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_daily_build_group_report_results_on_project_and_date ON ci_daily_build_group_report_results USING btree (project_id, date DESC) WHERE ((default_branch = true) AND ((data -> 'coverage'::text) IS NOT NULL)); -ALTER TABLE ONLY postgres_reindex_actions - ADD CONSTRAINT postgres_reindex_actions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_deleted_objects_on_pick_up_at ON ci_deleted_objects USING btree (pick_up_at); -ALTER TABLE ONLY programming_languages - ADD CONSTRAINT programming_languages_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_freeze_periods_on_project_id ON ci_freeze_periods USING btree (project_id); -ALTER TABLE ONLY project_access_tokens - ADD CONSTRAINT project_access_tokens_pkey PRIMARY KEY (personal_access_token_id, project_id); +CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key_and_environment ON ci_group_variables USING btree (group_id, key, environment_scope); -ALTER TABLE ONLY project_alerting_settings - ADD CONSTRAINT project_alerting_settings_pkey PRIMARY KEY (project_id); +CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON ci_instance_variables USING btree (key); -ALTER TABLE ONLY project_aliases - ADD CONSTRAINT project_aliases_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifact_states_on_job_artifact_id ON ci_job_artifact_states USING btree (job_artifact_id); -ALTER TABLE ONLY project_authorizations - ADD CONSTRAINT project_authorizations_pkey PRIMARY KEY (user_id, project_id, access_level); +CREATE INDEX index_ci_job_artifacts_for_terraform_reports ON ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18); -ALTER TABLE ONLY project_auto_devops - ADD CONSTRAINT project_auto_devops_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON ci_job_artifacts USING btree (id) WHERE (file_type = 18); -ALTER TABLE ONLY project_ci_cd_settings - ADD CONSTRAINT project_ci_cd_settings_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifacts_on_expire_at_and_job_id ON ci_job_artifacts USING btree (expire_at, job_id); -ALTER TABLE ONLY project_ci_feature_usages - ADD CONSTRAINT project_ci_feature_usages_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btree (file_store); -ALTER TABLE ONLY project_compliance_framework_settings - ADD CONSTRAINT project_compliance_framework_settings_pkey PRIMARY KEY (project_id); +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])); -ALTER TABLE ONLY project_custom_attributes - ADD CONSTRAINT project_custom_attributes_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifacts_on_id_project_id_and_created_at ON ci_job_artifacts USING btree (project_id, created_at, id); -ALTER TABLE ONLY project_daily_statistics - ADD CONSTRAINT project_daily_statistics_pkey PRIMARY KEY (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); -ALTER TABLE ONLY project_deploy_tokens - ADD CONSTRAINT project_deploy_tokens_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_artifacts USING btree (job_id, file_type); -ALTER TABLE ONLY project_error_tracking_settings - ADD CONSTRAINT project_error_tracking_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id); -ALTER TABLE ONLY project_export_jobs - ADD CONSTRAINT project_export_jobs_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_artifacts_on_project_id_for_security_reports ON ci_job_artifacts USING btree (project_id) WHERE (file_type = ANY (ARRAY[5, 6, 7, 8])); -ALTER TABLE ONLY project_feature_usages - ADD CONSTRAINT project_feature_usages_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_job_token_project_scope_links_on_added_by_id ON ci_job_token_project_scope_links USING btree (added_by_id); -ALTER TABLE ONLY project_features - ADD CONSTRAINT project_features_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_token_project_scope_links_on_target_project_id ON ci_job_token_project_scope_links USING btree (target_project_id); -ALTER TABLE ONLY project_group_links - ADD CONSTRAINT project_group_links_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_job_variables_on_job_id ON ci_job_variables USING btree (job_id); -ALTER TABLE ONLY project_import_data - ADD CONSTRAINT project_import_data_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_job_variables_on_key_and_job_id ON ci_job_variables USING btree (key, job_id); -ALTER TABLE ONLY project_incident_management_settings - ADD CONSTRAINT project_incident_management_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_minutes_additional_packs_on_namespace_id_purchase_xid ON ci_minutes_additional_packs USING btree (namespace_id, purchase_xid); -ALTER TABLE ONLY project_metrics_settings - ADD CONSTRAINT project_metrics_settings_pkey PRIMARY KEY (project_id); +CREATE UNIQUE INDEX index_ci_namespace_mirrors_on_namespace_id ON ci_namespace_mirrors USING btree (namespace_id); -ALTER TABLE ONLY project_mirror_data - ADD CONSTRAINT project_mirror_data_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_namespace_monthly_usages_on_namespace_id_and_date ON ci_namespace_monthly_usages USING btree (namespace_id, date); -ALTER TABLE ONLY project_pages_metadata - ADD CONSTRAINT project_pages_metadata_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_pending_builds_id_on_protected_partial ON ci_pending_builds USING btree (id) WHERE (protected = true); -ALTER TABLE ONLY project_repositories - ADD CONSTRAINT project_repositories_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_pending_builds_on_build_id ON ci_pending_builds USING btree (build_id); -ALTER TABLE ONLY project_repository_states - ADD CONSTRAINT project_repository_states_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pending_builds_on_namespace_id ON ci_pending_builds USING btree (namespace_id); -ALTER TABLE ONLY project_repository_storage_moves - ADD CONSTRAINT project_repository_storage_moves_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pending_builds_on_project_id ON ci_pending_builds USING btree (project_id); -ALTER TABLE ONLY project_security_settings - ADD CONSTRAINT project_security_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_pending_builds_on_tag_ids ON ci_pending_builds USING btree (tag_ids) WHERE (cardinality(tag_ids) > 0); -ALTER TABLE ONLY project_settings - ADD CONSTRAINT project_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_pipeline_artifacts_failed_verification ON ci_pipeline_artifacts USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -ALTER TABLE ONLY project_statistics - ADD CONSTRAINT project_statistics_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_needs_verification ON ci_pipeline_artifacts USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -ALTER TABLE ONLY project_topics - ADD CONSTRAINT project_topics_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_on_expire_at ON ci_pipeline_artifacts USING btree (expire_at); -ALTER TABLE ONLY project_tracing_settings - ADD CONSTRAINT project_tracing_settings_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_on_pipeline_id ON ci_pipeline_artifacts USING btree (pipeline_id); -ALTER TABLE ONLY projects - ADD CONSTRAINT projects_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_pipeline_artifacts_on_pipeline_id_and_file_type ON ci_pipeline_artifacts USING btree (pipeline_id, file_type); -ALTER TABLE ONLY prometheus_alert_events - ADD CONSTRAINT prometheus_alert_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_on_project_id ON ci_pipeline_artifacts USING btree (project_id); -ALTER TABLE ONLY prometheus_alerts - ADD CONSTRAINT prometheus_alerts_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_pending_verification ON ci_pipeline_artifacts USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -ALTER TABLE ONLY prometheus_metrics - ADD CONSTRAINT prometheus_metrics_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_artifacts_verification_state ON ci_pipeline_artifacts USING btree (verification_state); -ALTER TABLE ONLY protected_branch_merge_access_levels - ADD CONSTRAINT protected_branch_merge_access_levels_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_chat_data_on_chat_name_id ON ci_pipeline_chat_data USING btree (chat_name_id); -ALTER TABLE ONLY protected_branch_push_access_levels - ADD CONSTRAINT protected_branch_push_access_levels_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_chat_data USING btree (pipeline_id); -ALTER TABLE ONLY protected_branch_unprotect_access_levels - ADD CONSTRAINT protected_branch_unprotect_access_levels_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id); -ALTER TABLE ONLY protected_branches - ADD CONSTRAINT protected_branches_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key); -ALTER TABLE ONLY protected_environment_deploy_access_levels - ADD CONSTRAINT protected_environment_deploy_access_levels_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active); -ALTER TABLE ONLY protected_environments - ADD CONSTRAINT protected_environments_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_schedules_on_owner_id ON ci_pipeline_schedules USING btree (owner_id); -ALTER TABLE ONLY protected_tag_create_access_levels - ADD CONSTRAINT protected_tag_create_access_levels_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_schedules_on_owner_id_and_id_and_active ON ci_pipeline_schedules USING btree (owner_id, id) WHERE (active = true); -ALTER TABLE ONLY protected_tags - ADD CONSTRAINT protected_tags_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipeline_schedules_on_project_id ON ci_pipeline_schedules USING btree (project_id); -ALTER TABLE ONLY push_event_payloads - ADD CONSTRAINT push_event_payloads_pkey PRIMARY KEY (event_id); +CREATE UNIQUE INDEX index_ci_pipeline_variables_on_pipeline_id_and_key ON ci_pipeline_variables USING btree (pipeline_id, key); -ALTER TABLE ONLY push_rules - ADD CONSTRAINT push_rules_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_config_on_pipeline_id ON ci_pipelines_config USING btree (pipeline_id); -ALTER TABLE ONLY raw_usage_data - ADD CONSTRAINT raw_usage_data_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_for_ondemand_dast_scans ON ci_pipelines USING btree (id) WHERE (source = 13); -ALTER TABLE ONLY redirect_routes - ADD CONSTRAINT redirect_routes_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_auto_canceled_by_id ON ci_pipelines USING btree (auto_canceled_by_id); -ALTER TABLE ONLY release_links - ADD CONSTRAINT release_links_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_ci_ref_id_and_more ON ci_pipelines USING btree (ci_ref_id, id DESC, source, status) WHERE (ci_ref_id IS NOT NULL); -ALTER TABLE ONLY releases - ADD CONSTRAINT releases_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_external_pull_request_id ON ci_pipelines USING btree (external_pull_request_id) WHERE (external_pull_request_id IS NOT NULL); -ALTER TABLE ONLY remote_mirrors - ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_merge_request_id ON ci_pipelines USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); -ALTER TABLE ONLY repository_languages - ADD CONSTRAINT repository_languages_pkey PRIMARY KEY (project_id, programming_language_id); +CREATE INDEX index_ci_pipelines_on_pipeline_schedule_id_and_id ON ci_pipelines USING btree (pipeline_schedule_id, id); -ALTER TABLE ONLY required_code_owners_sections - ADD CONSTRAINT required_code_owners_sections_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_id_desc ON ci_pipelines USING btree (project_id, id DESC); -ALTER TABLE ONLY requirements_management_test_reports - ADD CONSTRAINT requirements_management_test_reports_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_pipelines_on_project_id_and_iid ON ci_pipelines USING btree (project_id, iid) WHERE (iid IS NOT NULL); -ALTER TABLE ONLY requirements - ADD CONSTRAINT requirements_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_ref_and_status_and_id ON ci_pipelines USING btree (project_id, ref, status, id); -ALTER TABLE ONLY resource_iteration_events - ADD CONSTRAINT resource_iteration_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_sha ON ci_pipelines USING btree (project_id, sha); -ALTER TABLE ONLY resource_label_events - ADD CONSTRAINT resource_label_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_source ON ci_pipelines USING btree (project_id, source); -ALTER TABLE ONLY resource_milestone_events - ADD CONSTRAINT resource_milestone_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_config_source ON ci_pipelines USING btree (project_id, status, config_source); -ALTER TABLE ONLY resource_state_events - ADD CONSTRAINT resource_state_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_created_at ON ci_pipelines USING btree (project_id, status, created_at); -ALTER TABLE ONLY resource_weight_events - ADD CONSTRAINT resource_weight_events_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_updated_at ON ci_pipelines USING btree (project_id, status, updated_at); -ALTER TABLE ONLY reviews - ADD CONSTRAINT reviews_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_id_and_user_id_and_status_and_ref ON ci_pipelines USING btree (project_id, user_id, status, ref) WHERE (source <> 12); -ALTER TABLE ONLY routes - ADD CONSTRAINT routes_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_project_idandrefandiddesc ON ci_pipelines USING btree (project_id, ref, id DESC); -ALTER TABLE ONLY saml_group_links - ADD CONSTRAINT saml_group_links_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_status_and_id ON ci_pipelines USING btree (status, id); -ALTER TABLE ONLY saml_providers - ADD CONSTRAINT saml_providers_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_config_source ON ci_pipelines USING btree (user_id, created_at, config_source); -ALTER TABLE ONLY scim_identities - ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipelines USING btree (user_id, created_at, source); -ALTER TABLE ONLY scim_oauth_access_tokens - ADD CONSTRAINT scim_oauth_access_tokens_pkey PRIMARY KEY (id); +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])); -ALTER TABLE ONLY security_findings - ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY security_orchestration_policy_configurations - ADD CONSTRAINT security_orchestration_policy_configurations_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_project_mirrors_on_namespace_id ON ci_project_mirrors USING btree (namespace_id); -ALTER TABLE ONLY security_orchestration_policy_rule_schedules - ADD CONSTRAINT security_orchestration_policy_rule_schedules_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_project_mirrors_on_project_id ON ci_project_mirrors USING btree (project_id); -ALTER TABLE ONLY security_scans - ADD CONSTRAINT security_scans_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_project_monthly_usages_on_project_id_and_date ON ci_project_monthly_usages USING btree (project_id, date); -ALTER TABLE ONLY self_managed_prometheus_alert_events - ADD CONSTRAINT self_managed_prometheus_alert_events_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_path ON ci_refs USING btree (project_id, ref_path); -ALTER TABLE ONLY sent_notifications - ADD CONSTRAINT sent_notifications_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_resource_groups_on_project_id_and_key ON ci_resource_groups USING btree (project_id, key); -ALTER TABLE ONLY sentry_issues - ADD CONSTRAINT sentry_issues_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_resources_on_build_id ON ci_resources USING btree (build_id); -ALTER TABLE ONLY serverless_domain_cluster - ADD CONSTRAINT serverless_domain_cluster_pkey PRIMARY KEY (uuid); +CREATE UNIQUE INDEX index_ci_resources_on_resource_group_id_and_build_id ON ci_resources USING btree (resource_group_id, build_id); -ALTER TABLE ONLY service_desk_settings - ADD CONSTRAINT service_desk_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_runner_namespaces_on_namespace_id ON ci_runner_namespaces USING btree (namespace_id); -ALTER TABLE ONLY shards - ADD CONSTRAINT shards_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_runner_namespaces_on_runner_id_and_namespace_id ON ci_runner_namespaces USING btree (runner_id, namespace_id); -ALTER TABLE ONLY slack_integrations - ADD CONSTRAINT slack_integrations_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runner_projects_on_project_id ON ci_runner_projects USING btree (project_id); -ALTER TABLE ONLY smartcard_identities - ADD CONSTRAINT smartcard_identities_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_active ON ci_runners USING btree (active, id); -ALTER TABLE ONLY snippet_repositories - ADD CONSTRAINT snippet_repositories_pkey PRIMARY KEY (snippet_id); +CREATE INDEX index_ci_runners_on_contacted_at_and_id_desc ON ci_runners USING btree (contacted_at, id DESC); -ALTER TABLE ONLY snippet_repository_storage_moves - ADD CONSTRAINT snippet_repository_storage_moves_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY snippet_statistics - ADD CONSTRAINT snippet_statistics_pkey PRIMARY KEY (snippet_id); +CREATE INDEX index_ci_runners_on_contacted_at_desc_and_id_desc ON ci_runners USING btree (contacted_at DESC, id DESC); -ALTER TABLE ONLY snippet_user_mentions - ADD CONSTRAINT snippet_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_created_at_and_id_desc ON ci_runners USING btree (created_at, id DESC); -ALTER TABLE ONLY snippets - ADD CONSTRAINT snippets_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY software_license_policies - ADD CONSTRAINT software_license_policies_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_created_at_desc_and_id_desc ON ci_runners USING btree (created_at DESC, id DESC); -ALTER TABLE ONLY software_licenses - ADD CONSTRAINT software_licenses_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops); -ALTER TABLE ONLY spam_logs - ADD CONSTRAINT spam_logs_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_locked ON ci_runners USING btree (locked); -ALTER TABLE ONLY sprints - ADD CONSTRAINT sprints_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_runner_type ON ci_runners USING btree (runner_type); -ALTER TABLE ONLY status_check_responses - ADD CONSTRAINT status_check_responses_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_token ON ci_runners USING btree (token); -ALTER TABLE ONLY status_page_published_incidents - ADD CONSTRAINT status_page_published_incidents_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted); -ALTER TABLE ONLY status_page_settings - ADD CONSTRAINT status_page_settings_pkey PRIMARY KEY (project_id); +CREATE INDEX index_ci_runners_on_token_expires_at_and_id_desc ON ci_runners USING btree (token_expires_at, id DESC); -ALTER TABLE ONLY subscriptions - ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_runners_on_token_expires_at_desc_and_id_desc ON ci_runners USING btree (token_expires_at DESC, id DESC); -ALTER TABLE ONLY suggestions - ADD CONSTRAINT suggestions_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_running_builds_on_build_id ON ci_running_builds USING btree (build_id); -ALTER TABLE ONLY system_note_metadata - ADD CONSTRAINT system_note_metadata_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_running_builds_on_project_id ON ci_running_builds USING btree (project_id); -ALTER TABLE ONLY taggings - ADD CONSTRAINT taggings_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_running_builds_on_runner_id ON ci_running_builds USING btree (runner_id); -ALTER TABLE ONLY tags - ADD CONSTRAINT tags_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_secure_files_on_project_id ON ci_secure_files USING btree (project_id); -ALTER TABLE ONLY term_agreements - ADD CONSTRAINT term_agreements_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_pipelines_on_pipeline_id ON ci_sources_pipelines USING btree (pipeline_id); -ALTER TABLE ONLY terraform_state_versions - ADD CONSTRAINT terraform_state_versions_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_pipelines_on_project_id ON ci_sources_pipelines USING btree (project_id); -ALTER TABLE ONLY terraform_states - ADD CONSTRAINT terraform_states_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_pipelines_on_source_job_id ON ci_sources_pipelines USING btree (source_job_id); -ALTER TABLE ONLY timelogs - ADD CONSTRAINT timelogs_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id ON ci_sources_pipelines USING btree (source_pipeline_id); -ALTER TABLE ONLY todos - ADD CONSTRAINT todos_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_pipelines_on_source_project_id ON ci_sources_pipelines USING btree (source_project_id); -ALTER TABLE ONLY token_with_ivs - ADD CONSTRAINT token_with_ivs_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_sources_projects_on_pipeline_id ON ci_sources_projects USING btree (pipeline_id); -ALTER TABLE ONLY topics - ADD CONSTRAINT topics_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_sources_projects_on_source_project_id_and_pipeline_id ON ci_sources_projects USING btree (source_project_id, pipeline_id); -ALTER TABLE ONLY trending_projects - ADD CONSTRAINT trending_projects_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_stages_on_pipeline_id ON ci_stages USING btree (pipeline_id); -ALTER TABLE ONLY u2f_registrations - ADD CONSTRAINT u2f_registrations_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_stages_on_pipeline_id_and_id ON ci_stages USING btree (pipeline_id, id) WHERE (status = ANY (ARRAY[0, 1, 2, 8, 9, 10])); -ALTER TABLE ONLY upcoming_reconciliations - ADD CONSTRAINT upcoming_reconciliations_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_and_name ON ci_stages USING btree (pipeline_id, name); -ALTER TABLE ONLY uploads - ADD CONSTRAINT uploads_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_stages_on_pipeline_id_and_position ON ci_stages USING btree (pipeline_id, "position"); -ALTER TABLE ONLY user_agent_details - ADD CONSTRAINT user_agent_details_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_stages_on_project_id ON ci_stages USING btree (project_id); -ALTER TABLE ONLY user_callouts - ADD CONSTRAINT user_callouts_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_subscriptions_projects_on_upstream_project_id ON ci_subscriptions_projects USING btree (upstream_project_id); -ALTER TABLE ONLY user_canonical_emails - ADD CONSTRAINT user_canonical_emails_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_subscriptions_projects_unique_subscription ON ci_subscriptions_projects USING btree (downstream_project_id, upstream_project_id); -ALTER TABLE ONLY user_credit_card_validations - ADD CONSTRAINT user_credit_card_validations_pkey PRIMARY KEY (user_id); +CREATE INDEX index_ci_trigger_requests_on_commit_id ON ci_trigger_requests USING btree (commit_id); -ALTER TABLE ONLY user_custom_attributes - ADD CONSTRAINT user_custom_attributes_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_trigger_requests_on_trigger_id_and_id ON ci_trigger_requests USING btree (trigger_id, id DESC); -ALTER TABLE ONLY user_details - ADD CONSTRAINT user_details_pkey PRIMARY KEY (user_id); +CREATE INDEX index_ci_triggers_on_owner_id ON ci_triggers USING btree (owner_id); -ALTER TABLE ONLY user_follow_users - ADD CONSTRAINT user_follow_users_pkey PRIMARY KEY (follower_id, followee_id); +CREATE INDEX index_ci_triggers_on_project_id ON ci_triggers USING btree (project_id); -ALTER TABLE ONLY user_group_callouts - ADD CONSTRAINT user_group_callouts_pkey PRIMARY KEY (id); +CREATE INDEX index_ci_unit_test_failures_on_build_id ON ci_unit_test_failures USING btree (build_id); -ALTER TABLE ONLY user_highest_roles - ADD CONSTRAINT user_highest_roles_pkey PRIMARY KEY (user_id); +CREATE UNIQUE INDEX index_ci_unit_tests_on_project_id_and_key_hash ON ci_unit_tests USING btree (project_id, key_hash); -ALTER TABLE ONLY user_interacted_projects - ADD CONSTRAINT user_interacted_projects_pkey PRIMARY KEY (project_id, user_id); +CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key); -ALTER TABLE ONLY user_permission_export_uploads - ADD CONSTRAINT user_permission_export_uploads_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_ci_variables_on_project_id_and_key_and_environment_scope ON ci_variables USING btree (project_id, key, environment_scope); -ALTER TABLE ONLY user_preferences - ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id); +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); -ALTER TABLE ONLY user_statuses - ADD CONSTRAINT user_statuses_pkey PRIMARY KEY (user_id); +CREATE INDEX index_cluster_agent_tokens_on_created_by_user_id ON cluster_agent_tokens USING btree (created_by_user_id); -ALTER TABLE ONLY user_synced_attributes_metadata - ADD CONSTRAINT user_synced_attributes_metadata_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_cluster_agent_tokens_on_token_encrypted ON cluster_agent_tokens USING btree (token_encrypted); -ALTER TABLE ONLY users_ops_dashboard_projects - ADD CONSTRAINT users_ops_dashboard_projects_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_agents_on_created_by_user_id ON cluster_agents USING btree (created_by_user_id); -ALTER TABLE ONLY users - ADD CONSTRAINT users_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_cluster_agents_on_project_id_and_name ON cluster_agents USING btree (project_id, name); -ALTER TABLE ONLY users_security_dashboard_projects - ADD CONSTRAINT users_security_dashboard_projects_pkey PRIMARY KEY (project_id, user_id); +CREATE UNIQUE INDEX index_cluster_groups_on_cluster_id_and_group_id ON cluster_groups USING btree (cluster_id, group_id); -ALTER TABLE ONLY users_star_projects - ADD CONSTRAINT users_star_projects_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_groups_on_group_id ON cluster_groups USING btree (group_id); -ALTER TABLE ONLY users_statistics - ADD CONSTRAINT users_statistics_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_cluster_platforms_kubernetes_on_cluster_id ON cluster_platforms_kubernetes USING btree (cluster_id); -ALTER TABLE ONLY vulnerabilities - ADD CONSTRAINT vulnerabilities_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_projects_on_cluster_id ON cluster_projects USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_exports - ADD CONSTRAINT vulnerability_exports_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_projects_on_project_id ON cluster_projects USING btree (project_id); -ALTER TABLE ONLY vulnerability_external_issue_links - ADD CONSTRAINT vulnerability_external_issue_links_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_cluster_providers_aws_on_cluster_id ON cluster_providers_aws USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_feedback - ADD CONSTRAINT vulnerability_feedback_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_providers_aws_on_cluster_id_and_status ON cluster_providers_aws USING btree (cluster_id, status); -ALTER TABLE ONLY vulnerability_finding_evidence_assets - ADD CONSTRAINT vulnerability_finding_evidence_assets_pkey PRIMARY KEY (id); +CREATE INDEX index_cluster_providers_gcp_on_cloud_run ON cluster_providers_gcp USING btree (cloud_run); -ALTER TABLE ONLY vulnerability_finding_evidence_headers - ADD CONSTRAINT vulnerability_finding_evidence_headers_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON cluster_providers_gcp USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_evidence_requests - ADD CONSTRAINT vulnerability_finding_evidence_requests_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON clusters_applications_cert_managers USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_evidence_responses - ADD CONSTRAINT vulnerability_finding_evidence_responses_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON clusters_applications_cilium USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_evidence_sources - ADD CONSTRAINT vulnerability_finding_evidence_sources_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clusters_applications_crossplane USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_evidence_supporting_messages - ADD CONSTRAINT vulnerability_finding_evidence_supporting_messages_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_evidences - ADD CONSTRAINT vulnerability_finding_evidences_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_links - ADD CONSTRAINT vulnerability_finding_links_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_finding_signatures - ADD CONSTRAINT vulnerability_finding_signatures_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_jupyter_on_cluster_id ON clusters_applications_jupyter USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_findings_remediations - ADD CONSTRAINT vulnerability_findings_remediations_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_applications_jupyter_on_oauth_application_id ON clusters_applications_jupyter USING btree (oauth_application_id); -ALTER TABLE ONLY vulnerability_flags - ADD CONSTRAINT vulnerability_flags_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_knative_on_cluster_id ON clusters_applications_knative USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_historical_statistics - ADD CONSTRAINT vulnerability_historical_statistics_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_prometheus_on_cluster_id ON clusters_applications_prometheus USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_identifiers - ADD CONSTRAINT vulnerability_identifiers_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_clusters_applications_runners_on_cluster_id ON clusters_applications_runners USING btree (cluster_id); -ALTER TABLE ONLY vulnerability_issue_links - ADD CONSTRAINT vulnerability_issue_links_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_applications_runners_on_runner_id ON clusters_applications_runners USING btree (runner_id); -ALTER TABLE ONLY vulnerability_occurrence_identifiers - ADD CONSTRAINT vulnerability_occurrence_identifiers_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_integration_elasticstack_enabled ON clusters_integration_elasticstack USING btree (enabled, created_at, cluster_id); -ALTER TABLE ONLY vulnerability_occurrence_pipelines - ADD CONSTRAINT vulnerability_occurrence_pipelines_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_integration_prometheus_enabled ON clusters_integration_prometheus USING btree (enabled, created_at, cluster_id); -ALTER TABLE ONLY vulnerability_occurrences - ADD CONSTRAINT vulnerability_occurrences_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_project_id ON clusters_kubernetes_namespaces USING btree (cluster_project_id); -ALTER TABLE ONLY vulnerability_remediations - ADD CONSTRAINT vulnerability_remediations_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_kubernetes_namespaces_on_environment_id ON clusters_kubernetes_namespaces USING btree (environment_id); -ALTER TABLE ONLY vulnerability_scanners - ADD CONSTRAINT vulnerability_scanners_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_kubernetes_namespaces_on_project_id ON clusters_kubernetes_namespaces USING btree (project_id); -ALTER TABLE ONLY vulnerability_statistics - ADD CONSTRAINT vulnerability_statistics_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_on_enabled_and_provider_type_and_id ON clusters USING btree (enabled, provider_type, id); -ALTER TABLE ONLY vulnerability_user_mentions - ADD CONSTRAINT vulnerability_user_mentions_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_on_enabled_cluster_type_id_and_created_at ON clusters USING btree (enabled, cluster_type, id, created_at); -ALTER TABLE ONLY web_hooks - ADD CONSTRAINT web_hooks_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_on_management_project_id ON clusters USING btree (management_project_id) WHERE (management_project_id IS NOT NULL); -ALTER TABLE ONLY webauthn_registrations - ADD CONSTRAINT webauthn_registrations_pkey PRIMARY KEY (id); +CREATE INDEX index_clusters_on_user_id ON clusters USING btree (user_id); -ALTER TABLE ONLY wiki_page_meta - ADD CONSTRAINT wiki_page_meta_pkey PRIMARY KEY (id); +CREATE UNIQUE INDEX index_commit_user_mentions_on_note_id ON commit_user_mentions USING btree (note_id); -ALTER TABLE ONLY wiki_page_slugs - ADD CONSTRAINT wiki_page_slugs_pkey PRIMARY KEY (id); +CREATE INDEX index_compliance_frameworks_id_where_frameworks_not_null ON compliance_management_frameworks USING btree (id) WHERE (pipeline_configuration_full_path IS NOT NULL); -ALTER TABLE ONLY work_item_types - ADD CONSTRAINT work_item_types_pkey PRIMARY KEY (id); +CREATE INDEX index_composer_cache_files_where_namespace_id_is_null ON packages_composer_cache_files USING btree (id) WHERE (namespace_id IS NULL); -ALTER TABLE ONLY x509_certificates - ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id); +CREATE INDEX index_container_expiration_policies_on_next_run_at_and_enabled ON container_expiration_policies USING btree (next_run_at, enabled); -ALTER TABLE ONLY x509_commit_signatures - ADD CONSTRAINT x509_commit_signatures_pkey PRIMARY KEY (id); +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])); -ALTER TABLE ONLY x509_issuers - ADD CONSTRAINT x509_issuers_pkey PRIMARY KEY (id); +CREATE INDEX index_container_repositories_on_migration_state_import_done_at ON container_repositories USING btree (migration_state, migration_import_done_at); -ALTER TABLE ONLY zentao_tracker_data - ADD CONSTRAINT zentao_tracker_data_pkey PRIMARY KEY (id); +CREATE INDEX index_container_repositories_on_project_id ON container_repositories USING btree (project_id); -ALTER TABLE ONLY zoom_meetings - ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); +CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repositories USING btree (project_id, id); -CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id); +CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON container_repositories USING btree (project_id, name); -CREATE INDEX audit_events_000000_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (created_at, author_id); +CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops); -CREATE INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ON ONLY audit_events USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE UNIQUE INDEX index_content_blocked_states_on_container_id_commit_sha_path ON content_blocked_states USING btree (container_identifier, commit_sha, path); -CREATE INDEX audit_events_000000_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE UNIQUE INDEX index_coverage_fuzzing_corpuses_on_package_id ON coverage_fuzzing_corpuses USING btree (package_id); -CREATE INDEX audit_events_202212_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202212 USING btree (created_at, author_id); +CREATE INDEX index_coverage_fuzzing_corpuses_on_project_id ON coverage_fuzzing_corpuses USING btree (project_id); -CREATE INDEX audit_events_202212_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202212 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE INDEX index_coverage_fuzzing_corpuses_on_user_id ON coverage_fuzzing_corpuses USING btree (user_id); -CREATE INDEX audit_events_202301_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202301 USING btree (created_at, author_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 audit_events_202301_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202301 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE INDEX index_csv_issue_imports_on_project_id ON csv_issue_imports USING btree (project_id); -CREATE INDEX audit_events_202302_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202302 USING btree (created_at, author_id); +CREATE INDEX index_csv_issue_imports_on_user_id ON csv_issue_imports USING btree (user_id); -CREATE INDEX audit_events_202302_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202302 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE INDEX index_custom_emoji_on_creator_id ON custom_emoji USING btree (creator_id); -CREATE INDEX audit_events_202303_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202303 USING btree (created_at, author_id); +CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON custom_emoji USING btree (namespace_id, name); -CREATE INDEX audit_events_202303_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202303 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE INDEX index_customer_relations_contacts_on_group_id ON customer_relations_contacts USING btree (group_id); -CREATE INDEX audit_events_202304_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202304 USING btree (created_at, author_id); +CREATE INDEX index_customer_relations_contacts_on_organization_id ON customer_relations_contacts USING btree (organization_id); -CREATE INDEX audit_events_202304_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202304 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE UNIQUE INDEX index_customer_relations_organizations_on_unique_name_per_group ON customer_relations_organizations USING btree (group_id, lower(name)); -CREATE INDEX audit_events_202305_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (created_at, author_id); +CREATE UNIQUE INDEX index_cycle_analytics_stage_event_hashes_on_hash_sha_256 ON analytics_cycle_analytics_stage_event_hashes USING btree (hash_sha256); -CREATE INDEX audit_events_202305_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); -CREATE INDEX audit_events_202306_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (created_at, author_id); +CREATE INDEX index_dast_profile_schedules_active_next_run_at ON dast_profile_schedules USING btree (active, next_run_at); -CREATE INDEX audit_events_202306_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE UNIQUE INDEX index_dast_profile_schedules_on_dast_profile_id ON dast_profile_schedules USING btree (dast_profile_id); -CREATE INDEX audit_events_202307_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202307 USING btree (created_at, author_id); +CREATE INDEX index_dast_profile_schedules_on_project_id ON dast_profile_schedules USING btree (project_id); -CREATE INDEX audit_events_202307_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202307 USING btree (entity_id, entity_type, id DESC, author_id, created_at); +CREATE INDEX index_dast_profile_schedules_on_user_id ON dast_profile_schedules USING btree (user_id); -CREATE INDEX index_incident_management_pending_alert_escalations_on_rule_id ON ONLY incident_management_pending_alert_escalations USING btree (rule_id); +CREATE INDEX index_dast_profiles_on_dast_scanner_profile_id ON dast_profiles USING btree (dast_scanner_profile_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 index_dast_profiles_on_dast_site_profile_id ON dast_profiles USING btree (dast_site_profile_id); -CREATE INDEX index_incident_management_pending_alert_escalations_on_alert_id ON ONLY incident_management_pending_alert_escalations USING btree (alert_id); +CREATE UNIQUE INDEX index_dast_profiles_on_project_id_and_name ON dast_profiles USING btree (project_id, name); -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 UNIQUE INDEX index_dast_profiles_pipelines_on_ci_pipeline_id ON dast_profiles_pipelines USING btree (ci_pipeline_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 UNIQUE INDEX index_dast_scanner_profiles_on_project_id_and_name ON dast_scanner_profiles USING btree (project_id, name); -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_dast_site_profiles_on_dast_site_id ON dast_site_profiles USING btree (dast_site_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 UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site_profiles USING btree (project_id, name); -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); +CREATE UNIQUE INDEX index_dast_site_profiles_pipelines_on_ci_pipeline_id ON dast_site_profiles_pipelines USING btree (ci_pipeline_id); -CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 USING btree (rule_id); +CREATE UNIQUE INDEX index_dast_site_token_on_project_id_and_url ON dast_site_tokens USING btree (project_id, url); -CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 USING btree (rule_id); +CREATE UNIQUE INDEX index_dast_site_token_on_token ON dast_site_tokens USING btree (token); -CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (rule_id); +CREATE INDEX index_dast_site_tokens_on_project_id ON dast_site_tokens USING btree (project_id); -CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (rule_id); +CREATE INDEX index_dast_site_validations_on_dast_site_token_id ON dast_site_validations USING btree (dast_site_token_id); -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 index_dast_site_validations_on_url_base_and_state ON dast_site_validations USING btree (url_base, state); -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 index_dast_sites_on_dast_site_validation_id ON dast_sites USING btree (dast_site_validation_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); +CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING btree (project_id, url); -CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 USING btree (alert_id); +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 incident_management_pending_alert_escalations_202_alert_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 USING btree (alert_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 incident_management_pending_alert_escalations_202_alert_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (alert_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 incident_management_pending_alert_escalations_202_alert_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (alert_id); +CREATE INDEX index_dependency_proxy_blobs_on_status ON dependency_proxy_blobs USING btree (status); -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_dependency_proxy_group_settings_on_group_id ON dependency_proxy_group_settings USING btree (group_id); -CREATE INDEX index_incident_management_pending_alert_escalations_on_schedule ON ONLY incident_management_pending_alert_escalations USING btree (schedule_id); +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 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 index_dependency_proxy_manifests_on_status ON dependency_proxy_manifests USING btree (status); -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 index_deploy_key_id_on_protected_branch_push_access_levels ON protected_branch_push_access_levels USING btree (deploy_key_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 index_deploy_keys_projects_on_deploy_key_id ON deploy_keys_projects USING btree (deploy_key_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 index_deploy_keys_projects_on_project_id ON deploy_keys_projects USING btree (project_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 UNIQUE INDEX index_deploy_tokens_on_token ON deploy_tokens USING btree (token); -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 index_deploy_tokens_on_token_and_expires_at_and_id ON deploy_tokens USING btree (token, expires_at, id) WHERE (revoked IS FALSE); -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 UNIQUE INDEX index_deploy_tokens_on_token_encrypted ON deploy_tokens USING btree (token_encrypted); -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 UNIQUE INDEX index_deployment_approvals_on_deployment_id_and_user_id ON deployment_approvals USING btree (deployment_id, user_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_deployment_approvals_on_user_id ON deployment_approvals USING btree (user_id); -CREATE INDEX index_incident_management_pending_issue_escalations_on_rule_id ON ONLY incident_management_pending_issue_escalations USING btree (rule_id); +CREATE UNIQUE INDEX index_deployment_clusters_on_cluster_id_and_deployment_id ON deployment_clusters USING btree (cluster_id, deployment_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_deployment_merge_requests_on_merge_request_id ON deployment_merge_requests USING btree (merge_request_id); -CREATE INDEX index_incident_management_pending_issue_escalations_on_issue_id ON ONLY incident_management_pending_issue_escalations USING btree (issue_id); +CREATE INDEX index_deployments_on_archived_project_id_iid ON deployments USING btree (archived, project_id, iid); -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 index_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status); -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_deployments_on_created_at ON deployments USING btree (created_at); -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_deployments_on_deployable_type_and_deployable_id ON deployments USING btree (deployable_type, deployable_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 index_deployments_on_environment_id_and_id ON deployments USING btree (environment_id, 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); +CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON deployments USING btree (environment_id, iid, project_id); -CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 USING btree (rule_id); +CREATE INDEX index_deployments_on_environment_id_and_ref ON deployments USING btree (environment_id, ref); -CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 USING btree (rule_id); +CREATE INDEX index_deployments_on_environment_id_status_and_finished_at ON deployments USING btree (environment_id, status, finished_at); -CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (rule_id); +CREATE INDEX index_deployments_on_environment_id_status_and_id ON deployments USING btree (environment_id, status, id); -CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (rule_id); +CREATE INDEX index_deployments_on_environment_status_sha ON deployments USING btree (environment_id, status, sha); -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 index_deployments_on_id_and_status_and_created_at ON deployments USING btree (id, status, created_at); -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 index_deployments_on_id_where_cluster_id_present ON deployments USING btree (id) WHERE (cluster_id IS NOT NULL); -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); +CREATE INDEX index_deployments_on_project_and_environment_and_updated_at_id ON deployments USING btree (project_id, environment_id, updated_at, id); -CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 USING btree (issue_id); +CREATE INDEX index_deployments_on_project_and_finished ON deployments USING btree (project_id, finished_at) WHERE (status = 2); -CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 USING btree (issue_id); +CREATE INDEX index_deployments_on_project_id_and_id ON deployments USING btree (project_id, id DESC); -CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (issue_id); +CREATE UNIQUE INDEX index_deployments_on_project_id_and_iid ON deployments USING btree (project_id, iid); -CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (issue_id); +CREATE INDEX index_deployments_on_project_id_and_ref ON deployments USING btree (project_id, ref); -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 index_deployments_on_project_id_and_status ON deployments USING btree (project_id, status); -CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs USING btree (web_hook_id); +CREATE INDEX index_deployments_on_project_id_and_status_and_created_at ON deployments USING btree (project_id, status, created_at); -CREATE INDEX index_1554dc6f11 ON gitlab_partitions_dynamic.web_hook_logs_202301 USING btree (web_hook_id); +CREATE INDEX index_deployments_on_project_id_and_updated_at_and_id ON deployments USING btree (project_id, updated_at DESC, id DESC); -CREATE INDEX index_719c6187cb ON gitlab_partitions_dynamic.web_hook_logs_202212 USING btree (web_hook_id); +CREATE INDEX index_deployments_on_project_id_sha ON deployments USING btree (project_id, sha); -CREATE INDEX index_80bf138a51 ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (web_hook_id); +CREATE INDEX index_deployments_on_user_id_and_status_and_created_at ON deployments USING btree (user_id, status, created_at); -CREATE INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ON ONLY web_hook_logs USING btree (created_at, web_hook_id); +CREATE INDEX index_description_versions_on_epic_id ON description_versions USING btree (epic_id) WHERE (epic_id IS NOT NULL); -CREATE INDEX index_962081978f ON gitlab_partitions_dynamic.web_hook_logs_202212 USING btree (created_at, web_hook_id); +CREATE INDEX index_description_versions_on_issue_id ON description_versions USING btree (issue_id) WHERE (issue_id IS NOT NULL); -CREATE INDEX index_eecfac613f ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (created_at, web_hook_id); +CREATE INDEX index_description_versions_on_merge_request_id ON description_versions USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); -CREATE INDEX index_fdb8d5eeea ON gitlab_partitions_dynamic.web_hook_logs_202301 USING btree (created_at, web_hook_id); +CREATE INDEX index_design_management_designs_issue_id_relative_position_id ON design_management_designs USING btree (issue_id, relative_position, id); -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 UNIQUE INDEX index_design_management_designs_on_iid_and_project_id ON design_management_designs USING btree (project_id, iid); -CREATE INDEX web_hook_logs_202302_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202302 USING btree (web_hook_id); +CREATE UNIQUE INDEX index_design_management_designs_on_issue_id_and_filename ON design_management_designs USING btree (issue_id, filename); -CREATE INDEX web_hook_logs_202303_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202303 USING btree (created_at, web_hook_id); +CREATE INDEX index_design_management_designs_on_project_id ON design_management_designs USING btree (project_id); -CREATE INDEX web_hook_logs_202303_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202303 USING btree (web_hook_id); +CREATE INDEX index_design_management_designs_versions_on_design_id ON design_management_designs_versions USING btree (design_id); -CREATE INDEX web_hook_logs_202304_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202304 USING btree (created_at, web_hook_id); +CREATE INDEX index_design_management_designs_versions_on_event ON design_management_designs_versions USING btree (event); -CREATE INDEX web_hook_logs_202304_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202304 USING btree (web_hook_id); +CREATE INDEX index_design_management_designs_versions_on_version_id ON design_management_designs_versions USING btree (version_id); -CREATE INDEX web_hook_logs_202305_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (created_at, web_hook_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 web_hook_logs_202305_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (web_hook_id); +CREATE INDEX index_design_management_versions_on_issue_id ON design_management_versions USING btree (issue_id); -CREATE INDEX web_hook_logs_202306_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (created_at, web_hook_id); +CREATE UNIQUE INDEX index_design_management_versions_on_sha_and_issue_id ON design_management_versions USING btree (sha, issue_id); -CREATE INDEX web_hook_logs_202306_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (web_hook_id); +CREATE UNIQUE INDEX index_design_user_mentions_on_note_id ON design_user_mentions USING btree (note_id); -CREATE INDEX web_hook_logs_202307_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (created_at, web_hook_id); +CREATE UNIQUE INDEX index_diff_note_positions_on_note_id_and_diff_type ON diff_note_positions USING btree (note_id, diff_type); -CREATE INDEX web_hook_logs_202307_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (web_hook_id); +CREATE UNIQUE INDEX index_dora_daily_metrics_on_environment_id_and_date ON dora_daily_metrics USING btree (environment_id, date); -CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp); +CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id); -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); +CREATE INDEX index_draft_notes_on_discussion_id ON draft_notes USING btree (discussion_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx11 ON gitlab_partitions_static.product_analytics_events_experimental_11 USING btree (project_id, collector_tstamp); +CREATE INDEX index_draft_notes_on_merge_request_id ON draft_notes USING btree (merge_request_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx12 ON gitlab_partitions_static.product_analytics_events_experimental_12 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_elastic_index_settings_on_alias_name ON elastic_index_settings USING btree (alias_name); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx13 ON gitlab_partitions_static.product_analytics_events_experimental_13 USING btree (project_id, collector_tstamp); +CREATE INDEX index_elastic_reindexing_subtasks_on_elastic_reindexing_task_id ON elastic_reindexing_subtasks USING btree (elastic_reindexing_task_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx14 ON gitlab_partitions_static.product_analytics_events_experimental_14 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_elastic_reindexing_tasks_on_in_progress ON elastic_reindexing_tasks USING btree (in_progress) WHERE in_progress; -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx15 ON gitlab_partitions_static.product_analytics_events_experimental_15 USING btree (project_id, collector_tstamp); +CREATE INDEX index_elastic_reindexing_tasks_on_state ON elastic_reindexing_tasks USING btree (state); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx16 ON gitlab_partitions_static.product_analytics_events_experimental_16 USING btree (project_id, collector_tstamp); +CREATE INDEX index_elasticsearch_indexed_namespaces_on_created_at ON elasticsearch_indexed_namespaces USING btree (created_at); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx17 ON gitlab_partitions_static.product_analytics_events_experimental_17 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_emails_on_confirmation_token ON emails USING btree (confirmation_token); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx18 ON gitlab_partitions_static.product_analytics_events_experimental_18 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_emails_on_email ON emails USING btree (email); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx19 ON gitlab_partitions_static.product_analytics_events_experimental_19 USING btree (project_id, collector_tstamp); +CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx20 ON gitlab_partitions_static.product_analytics_events_experimental_20 USING btree (project_id, collector_tstamp); +CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx21 ON gitlab_partitions_static.product_analytics_events_experimental_21 USING btree (project_id, collector_tstamp); +CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx22 ON gitlab_partitions_static.product_analytics_events_experimental_22 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx23 ON gitlab_partitions_static.product_analytics_events_experimental_23 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_environments_on_project_id_and_slug ON environments USING btree (project_id, slug); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx24 ON gitlab_partitions_static.product_analytics_events_experimental_24 USING btree (project_id, collector_tstamp); +CREATE INDEX index_environments_on_project_id_and_tier ON environments USING btree (project_id, tier) WHERE (tier IS NOT NULL); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx25 ON gitlab_partitions_static.product_analytics_events_experimental_25 USING btree (project_id, collector_tstamp); +CREATE INDEX index_environments_on_project_id_state_environment_type ON environments USING btree (project_id, state, environment_type); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx26 ON gitlab_partitions_static.product_analytics_events_experimental_26 USING btree (project_id, collector_tstamp); +CREATE INDEX index_environments_on_state_and_auto_delete_at ON environments USING btree (auto_delete_at) WHERE ((auto_delete_at IS NOT NULL) AND ((state)::text = 'stopped'::text)); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx27 ON gitlab_partitions_static.product_analytics_events_experimental_27 USING btree (project_id, collector_tstamp); +CREATE INDEX index_environments_on_state_and_auto_stop_at ON environments USING btree (state, auto_stop_at) WHERE ((auto_stop_at IS NOT NULL) AND ((state)::text = 'available'::text)); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx28 ON gitlab_partitions_static.product_analytics_events_experimental_28 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_epic_board_list_preferences_on_user_and_list ON boards_epic_list_user_preferences USING btree (user_id, epic_list_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx29 ON gitlab_partitions_static.product_analytics_events_experimental_29 USING btree (project_id, collector_tstamp); +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 product_analytics_events_expe_project_id_collector_tstamp_idx30 ON gitlab_partitions_static.product_analytics_events_experimental_30 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epic_issues_on_epic_id_and_issue_id ON epic_issues USING btree (epic_id, issue_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx31 ON gitlab_partitions_static.product_analytics_events_experimental_31 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_epic_issues_on_issue_id ON epic_issues USING btree (issue_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx32 ON gitlab_partitions_static.product_analytics_events_experimental_32 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epic_metrics ON epic_metrics USING btree (epic_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx33 ON gitlab_partitions_static.product_analytics_events_experimental_33 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_epic_user_mentions_on_note_id ON epic_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx34 ON gitlab_partitions_static.product_analytics_events_experimental_34 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_assignee_id ON epics USING btree (assignee_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx35 ON gitlab_partitions_static.product_analytics_events_experimental_35 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_author_id ON epics USING btree (author_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx36 ON gitlab_partitions_static.product_analytics_events_experimental_36 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_closed_by_id ON epics USING btree (closed_by_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx37 ON gitlab_partitions_static.product_analytics_events_experimental_37 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_confidential ON epics USING btree (confidential); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx38 ON gitlab_partitions_static.product_analytics_events_experimental_38 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_due_date_sourcing_epic_id ON epics USING btree (due_date_sourcing_epic_id) WHERE (due_date_sourcing_epic_id IS NOT NULL); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx39 ON gitlab_partitions_static.product_analytics_events_experimental_39 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_due_date_sourcing_milestone_id ON epics USING btree (due_date_sourcing_milestone_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx40 ON gitlab_partitions_static.product_analytics_events_experimental_40 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_end_date ON epics USING btree (end_date); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx41 ON gitlab_partitions_static.product_analytics_events_experimental_41 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_epics_on_group_id_and_external_key ON epics USING btree (group_id, external_key) WHERE (external_key IS NOT NULL); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx42 ON gitlab_partitions_static.product_analytics_events_experimental_42 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_epics_on_group_id_and_iid ON epics USING btree (group_id, iid); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx43 ON gitlab_partitions_static.product_analytics_events_experimental_43 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_group_id_and_iid_varchar_pattern ON epics USING btree (group_id, ((iid)::character varying) varchar_pattern_ops); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx44 ON gitlab_partitions_static.product_analytics_events_experimental_44 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_iid ON epics USING btree (iid); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx45 ON gitlab_partitions_static.product_analytics_events_experimental_45 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_last_edited_by_id ON epics USING btree (last_edited_by_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx46 ON gitlab_partitions_static.product_analytics_events_experimental_46 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_parent_id ON epics USING btree (parent_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx47 ON gitlab_partitions_static.product_analytics_events_experimental_47 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_start_date ON epics USING btree (start_date); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx48 ON gitlab_partitions_static.product_analytics_events_experimental_48 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_start_date_sourcing_epic_id ON epics USING btree (start_date_sourcing_epic_id) WHERE (start_date_sourcing_epic_id IS NOT NULL); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx49 ON gitlab_partitions_static.product_analytics_events_experimental_49 USING btree (project_id, collector_tstamp); +CREATE INDEX index_epics_on_start_date_sourcing_milestone_id ON epics USING btree (start_date_sourcing_milestone_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx50 ON gitlab_partitions_static.product_analytics_events_experimental_50 USING btree (project_id, collector_tstamp); +CREATE INDEX index_error_tracking_client_keys_on_project_id ON error_tracking_client_keys USING btree (project_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx51 ON gitlab_partitions_static.product_analytics_events_experimental_51 USING btree (project_id, collector_tstamp); +CREATE INDEX index_error_tracking_error_events_on_error_id ON error_tracking_error_events USING btree (error_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx52 ON gitlab_partitions_static.product_analytics_events_experimental_52 USING btree (project_id, collector_tstamp); +CREATE INDEX index_error_tracking_errors_on_project_id ON error_tracking_errors USING btree (project_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx53 ON gitlab_partitions_static.product_analytics_events_experimental_53 USING btree (project_id, collector_tstamp); +CREATE INDEX index_esc_protected_branches_on_external_status_check_id ON external_status_checks_protected_branches USING btree (external_status_check_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx54 ON gitlab_partitions_static.product_analytics_events_experimental_54 USING btree (project_id, collector_tstamp); +CREATE INDEX index_esc_protected_branches_on_protected_branch_id ON external_status_checks_protected_branches USING btree (protected_branch_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx55 ON gitlab_partitions_static.product_analytics_events_experimental_55 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_escalation_rules_on_all_attributes ON incident_management_escalation_rules USING btree (policy_id, oncall_schedule_id, status, elapsed_time_seconds, user_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx56 ON gitlab_partitions_static.product_analytics_events_experimental_56 USING btree (project_id, collector_tstamp); +CREATE INDEX index_escalation_rules_on_user ON incident_management_escalation_rules USING btree (user_id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx57 ON gitlab_partitions_static.product_analytics_events_experimental_57 USING btree (project_id, collector_tstamp); +CREATE INDEX index_et_errors_on_project_id_and_status_and_id ON error_tracking_errors USING btree (project_id, status, id); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx58 ON gitlab_partitions_static.product_analytics_events_experimental_58 USING btree (project_id, collector_tstamp); +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 product_analytics_events_expe_project_id_collector_tstamp_idx59 ON gitlab_partitions_static.product_analytics_events_experimental_59 USING btree (project_id, collector_tstamp); +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 product_analytics_events_expe_project_id_collector_tstamp_idx60 ON gitlab_partitions_static.product_analytics_events_experimental_60 USING btree (project_id, collector_tstamp); +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 product_analytics_events_expe_project_id_collector_tstamp_idx61 ON gitlab_partitions_static.product_analytics_events_experimental_61 USING btree (project_id, collector_tstamp); +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 product_analytics_events_expe_project_id_collector_tstamp_idx62 ON gitlab_partitions_static.product_analytics_events_experimental_62 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_action ON events USING btree (action); -CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx63 ON gitlab_partitions_static.product_analytics_events_experimental_63 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx1 ON gitlab_partitions_static.product_analytics_events_experimental_01 USING btree (project_id, collector_tstamp); +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 product_analytics_events_exper_project_id_collector_tstamp_idx2 ON gitlab_partitions_static.product_analytics_events_experimental_02 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_author_id_and_id ON events USING btree (author_id, id); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx3 ON gitlab_partitions_static.product_analytics_events_experimental_03 USING btree (project_id, collector_tstamp); +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 product_analytics_events_exper_project_id_collector_tstamp_idx4 ON gitlab_partitions_static.product_analytics_events_experimental_04 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx5 ON gitlab_partitions_static.product_analytics_events_experimental_05 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_project_id_and_created_at ON events USING btree (project_id, created_at); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx6 ON gitlab_partitions_static.product_analytics_events_experimental_06 USING btree (project_id, collector_tstamp); +CREATE INDEX index_events_on_project_id_and_id ON events USING btree (project_id, id); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx7 ON gitlab_partitions_static.product_analytics_events_experimental_07 USING btree (project_id, collector_tstamp); +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 product_analytics_events_exper_project_id_collector_tstamp_idx8 ON gitlab_partitions_static.product_analytics_events_experimental_08 USING btree (project_id, collector_tstamp); +CREATE UNIQUE INDEX index_events_on_target_type_and_target_id_and_fingerprint ON events USING btree (target_type, target_id, fingerprint); -CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx9 ON gitlab_partitions_static.product_analytics_events_experimental_09 USING btree (project_id, collector_tstamp); +CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id); -CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON gitlab_partitions_static.product_analytics_events_experimental_00 USING btree (project_id, collector_tstamp); +CREATE INDEX index_experiment_subjects_on_experiment_id ON experiment_subjects USING btree (experiment_id); -CREATE INDEX active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[])))); +CREATE INDEX index_experiment_subjects_on_namespace_id ON experiment_subjects USING btree (namespace_id); -CREATE INDEX analytics_index_events_on_created_at_and_author_id ON events USING btree (created_at, author_id); +CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USING btree (project_id); -CREATE INDEX analytics_repository_languages_on_project_id ON analytics_language_trend_repository_languages USING btree (project_id); +CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id); -CREATE UNIQUE INDEX any_approver_merge_request_rule_type_unique_index ON approval_merge_request_rules USING btree (merge_request_id, rule_type) WHERE (rule_type = 4); +CREATE INDEX index_experiment_users_on_experiment_id ON experiment_users USING btree (experiment_id); -CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON approval_project_rules USING btree (project_id) WHERE (rule_type = 3); +CREATE INDEX index_experiment_users_on_user_id ON experiment_users USING btree (user_id); -CREATE INDEX approval_mr_rule_index_merge_request_id ON approval_merge_request_rules USING btree (merge_request_id); +CREATE UNIQUE INDEX index_experiments_on_name ON experiments USING btree (name); -CREATE UNIQUE INDEX bulk_import_trackers_uniq_relation_by_entity ON bulk_import_trackers USING btree (bulk_import_entity_id, relation); +CREATE INDEX index_expired_and_not_notified_personal_access_tokens ON personal_access_tokens USING btree (id, expires_at) WHERE ((impersonation = false) AND (revoked = false) AND (expire_notification_delivered = false)); -CREATE 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 UNIQUE INDEX index_external_audit_event_destinations_on_namespace_id ON audit_events_external_audit_event_destinations USING btree (namespace_id, destination_url); -CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); +CREATE UNIQUE INDEX index_external_pull_requests_on_project_and_branches ON external_pull_requests USING btree (project_id, source_branch, target_branch); -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 index_feature_flag_scopes_on_flag_id_and_environment_scope ON operations_feature_flag_scopes USING btree (feature_flag_id, environment_scope); -CREATE UNIQUE INDEX commit_user_mentions_on_commit_id_and_note_id_unique_index ON commit_user_mentions USING btree (commit_id, note_id); +CREATE UNIQUE INDEX index_feature_flags_clients_on_project_id_and_token_encrypted ON operations_feature_flags_clients USING btree (project_id, token_encrypted); -CREATE INDEX composer_cache_files_index_on_deleted_at ON packages_composer_cache_files USING btree (delete_at, id); +CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feature_gates USING btree (feature_key, key, value); -CREATE UNIQUE INDEX dast_scanner_profiles_builds_on_ci_build_id ON dast_scanner_profiles_builds USING btree (ci_build_id); +CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key); -CREATE UNIQUE INDEX dast_site_profiles_builds_on_ci_build_id ON dast_site_profiles_builds USING btree (ci_build_id); +CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status); -CREATE UNIQUE INDEX design_management_designs_versions_uniqueness ON design_management_designs_versions USING btree (design_id, version_id); +CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id); -CREATE UNIQUE INDEX design_user_mentions_on_design_id_and_note_id_unique_index ON design_user_mentions USING btree (design_id, note_id); +CREATE INDEX index_fork_network_members_on_forked_from_project_id ON fork_network_members USING btree (forked_from_project_id); -CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON epic_user_mentions USING btree (epic_id, note_id); +CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_members USING btree (project_id); -CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL); +CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id); -CREATE INDEX finding_evidence_assets_on_finding_evidence_id ON vulnerability_finding_evidence_assets USING btree (vulnerability_finding_evidence_id); +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 finding_evidence_header_on_finding_evidence_request_id ON vulnerability_finding_evidence_headers USING btree (vulnerability_finding_evidence_request_id); +CREATE INDEX index_geo_event_log_on_container_repository_updated_event_id ON geo_event_log USING btree (container_repository_updated_event_id); -CREATE INDEX finding_evidence_header_on_finding_evidence_response_id ON vulnerability_finding_evidence_headers USING btree (vulnerability_finding_evidence_response_id); +CREATE INDEX index_geo_event_log_on_geo_event_id ON geo_event_log USING btree (geo_event_id) WHERE (geo_event_id IS NOT NULL); -CREATE INDEX finding_evidence_requests_on_finding_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_id); +CREATE INDEX index_geo_event_log_on_hashed_storage_attachments_event_id ON geo_event_log USING btree (hashed_storage_attachments_event_id) WHERE (hashed_storage_attachments_event_id IS NOT NULL); -CREATE INDEX finding_evidence_requests_on_supporting_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_supporting_message_id); +CREATE INDEX index_geo_event_log_on_hashed_storage_migrated_event_id ON geo_event_log USING btree (hashed_storage_migrated_event_id) WHERE (hashed_storage_migrated_event_id IS NOT NULL); -CREATE INDEX finding_evidence_responses_on_finding_evidences_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_id); +CREATE INDEX index_geo_event_log_on_job_artifact_deleted_event_id ON geo_event_log USING btree (job_artifact_deleted_event_id) WHERE (job_artifact_deleted_event_id IS NOT NULL); -CREATE INDEX finding_evidence_responses_on_supporting_evidence_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_supporting_message_id); +CREATE INDEX index_geo_event_log_on_lfs_object_deleted_event_id ON geo_event_log USING btree (lfs_object_deleted_event_id) WHERE (lfs_object_deleted_event_id IS NOT NULL); -CREATE INDEX finding_evidence_sources_on_finding_evidence_id ON vulnerability_finding_evidence_sources USING btree (vulnerability_finding_evidence_id); +CREATE INDEX index_geo_event_log_on_repositories_changed_event_id ON geo_event_log USING btree (repositories_changed_event_id) WHERE (repositories_changed_event_id IS NOT NULL); -CREATE INDEX finding_evidence_supporting_messages_on_finding_evidence_id ON vulnerability_finding_evidence_supporting_messages USING btree (vulnerability_finding_evidence_id); +CREATE INDEX index_geo_event_log_on_repository_created_event_id ON geo_event_log USING btree (repository_created_event_id) WHERE (repository_created_event_id IS NOT NULL); -CREATE INDEX finding_evidences_on_vulnerability_occurrence_id ON vulnerability_finding_evidences USING btree (vulnerability_occurrence_id); +CREATE INDEX index_geo_event_log_on_repository_deleted_event_id ON geo_event_log USING btree (repository_deleted_event_id) WHERE (repository_deleted_event_id IS NOT NULL); -CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id); +CREATE INDEX index_geo_event_log_on_repository_renamed_event_id ON geo_event_log USING btree (repository_renamed_event_id) WHERE (repository_renamed_event_id IS NOT NULL); -CREATE UNIQUE INDEX i_ci_job_token_project_scope_links_on_source_and_target_project ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id); +CREATE INDEX index_geo_event_log_on_repository_updated_event_id ON geo_event_log USING btree (repository_updated_event_id) WHERE (repository_updated_event_id IS NOT NULL); -CREATE INDEX idx_analytics_devops_adoption_segments_on_namespace_id ON analytics_devops_adoption_segments USING btree (namespace_id); +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 idx_analytics_devops_adoption_snapshots_finalized ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time) WHERE (recorded_at >= end_time); +CREATE INDEX index_geo_hashed_storage_attachments_events_on_project_id ON geo_hashed_storage_attachments_events USING btree (project_id); -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 index_geo_hashed_storage_migrated_events_on_project_id ON geo_hashed_storage_migrated_events USING btree (project_id); -CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); +CREATE INDEX index_geo_job_artifact_deleted_events_on_job_artifact_id ON geo_job_artifact_deleted_events USING btree (job_artifact_id); -CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at ON container_expiration_policies USING btree (project_id, next_run_at) WHERE (enabled = true); +CREATE INDEX index_geo_lfs_object_deleted_events_on_lfs_object_id ON geo_lfs_object_deleted_events USING btree (lfs_object_id); -CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at_enabled ON container_expiration_policies USING btree (project_id, next_run_at, enabled); +CREATE INDEX index_geo_node_namespace_links_on_geo_node_id ON geo_node_namespace_links USING btree (geo_node_id); -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 UNIQUE INDEX index_geo_node_namespace_links_on_geo_node_id_and_namespace_id ON geo_node_namespace_links USING btree (geo_node_id, namespace_id); -CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace); +CREATE INDEX index_geo_node_namespace_links_on_namespace_id ON geo_node_namespace_links USING btree (namespace_id); -CREATE INDEX idx_devops_adoption_segments_namespace_end_time ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time); +CREATE UNIQUE INDEX index_geo_node_statuses_on_geo_node_id ON geo_node_statuses USING btree (geo_node_id); -CREATE INDEX idx_devops_adoption_segments_namespace_recorded_at ON analytics_devops_adoption_snapshots USING btree (namespace_id, recorded_at); +CREATE INDEX index_geo_nodes_on_access_key ON geo_nodes USING btree (access_key); -CREATE UNIQUE INDEX idx_devops_adoption_segments_namespaces_pair ON analytics_devops_adoption_segments USING btree (display_namespace_id, namespace_id); +CREATE UNIQUE INDEX index_geo_nodes_on_name ON geo_nodes USING btree (name); -CREATE INDEX idx_eaprpb_external_approval_rule_id ON external_approval_rules_protected_branches USING btree (external_approval_rule_id); +CREATE INDEX index_geo_nodes_on_primary ON geo_nodes USING btree ("primary"); -CREATE INDEX idx_elastic_reindexing_slices_on_elastic_reindexing_subtask_id ON elastic_reindexing_slices USING btree (elastic_reindexing_subtask_id); +CREATE INDEX index_geo_repositories_changed_events_on_geo_node_id ON geo_repositories_changed_events USING btree (geo_node_id); -CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_merge_requests USING btree (environment_id, merge_request_id); +CREATE INDEX index_geo_repository_created_events_on_project_id ON geo_repository_created_events USING btree (project_id); -CREATE INDEX idx_geo_con_rep_updated_events_on_container_repository_id ON geo_container_repository_updated_events USING btree (container_repository_id); +CREATE INDEX index_geo_repository_deleted_events_on_project_id ON geo_repository_deleted_events USING btree (project_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 index_geo_repository_renamed_events_on_project_id ON geo_repository_renamed_events USING btree (project_id); -CREATE INDEX idx_issues_on_health_status_not_null ON issues USING btree (health_status) WHERE (health_status IS NOT NULL); +CREATE INDEX index_geo_repository_updated_events_on_project_id ON geo_repository_updated_events USING btree (project_id); -CREATE INDEX idx_issues_on_project_id_and_created_at_and_id_and_state_id ON issues USING btree (project_id, created_at, id, state_id); +CREATE INDEX index_geo_repository_updated_events_on_source ON geo_repository_updated_events USING btree (source); -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 index_geo_reset_checksum_events_on_project_id ON geo_reset_checksum_events USING btree (project_id); -CREATE INDEX idx_issues_on_project_id_and_rel_asc_and_id ON issues USING btree (project_id, relative_position, id); +CREATE INDEX index_gin_ci_namespace_mirrors_on_traversal_ids ON ci_namespace_mirrors USING gin (traversal_ids); -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 index_gin_ci_pending_builds_on_namespace_traversal_ids ON ci_pending_builds USING gin (namespace_traversal_ids); -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); +CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gitlab_subscription_histories USING btree (gitlab_subscription_id); -CREATE INDEX idx_issues_on_state_id ON issues USING btree (state_id); +CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_subscriptions USING btree (end_date, namespace_id); -CREATE INDEX idx_jira_connect_subscriptions_on_installation_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id); +CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id); -CREATE UNIQUE INDEX idx_jira_connect_subscriptions_on_installation_id_namespace_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id, namespace_id); +CREATE UNIQUE INDEX index_gitlab_subscriptions_on_namespace_id ON gitlab_subscriptions USING btree (namespace_id); -CREATE INDEX idx_keys_expires_at_and_before_expiry_notification_undelivered ON keys USING btree (date(timezone('UTC'::text, expires_at)), before_expiry_notification_delivered_at) WHERE (before_expiry_notification_delivered_at IS NULL); +CREATE UNIQUE INDEX index_gpg_key_subkeys_on_fingerprint ON gpg_key_subkeys USING btree (fingerprint); -CREATE INDEX idx_members_created_at_user_id_invite_token ON members USING btree (created_at) WHERE ((invite_token IS NOT NULL) AND (user_id IS NULL)); +CREATE INDEX index_gpg_key_subkeys_on_gpg_key_id ON gpg_key_subkeys USING btree (gpg_key_id); -CREATE INDEX idx_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND (state_id = 4)); +CREATE UNIQUE INDEX index_gpg_key_subkeys_on_keyid ON gpg_key_subkeys USING btree (keyid); -CREATE INDEX idx_merge_requests_on_merged_state ON merge_requests USING btree (id) WHERE (state_id = 3); +CREATE UNIQUE INDEX index_gpg_keys_on_fingerprint ON gpg_keys USING btree (fingerprint); -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 UNIQUE INDEX index_gpg_keys_on_primary_keyid ON gpg_keys USING btree (primary_keyid); -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 index_gpg_keys_on_user_id ON gpg_keys USING btree (user_id); -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 UNIQUE INDEX index_gpg_signatures_on_commit_sha ON gpg_signatures USING btree (commit_sha); -CREATE INDEX idx_merge_requests_on_target_project_id_and_locked_state ON merge_requests USING btree (target_project_id) WHERE (state_id = 4); +CREATE INDEX index_gpg_signatures_on_gpg_key_id ON gpg_signatures USING btree (gpg_key_id); -CREATE UNIQUE INDEX idx_metrics_users_starred_dashboard_on_user_project_dashboard ON metrics_users_starred_dashboards USING btree (user_id, project_id, dashboard_path); +CREATE INDEX index_gpg_signatures_on_gpg_key_primary_keyid ON gpg_signatures USING btree (gpg_key_primary_keyid); -CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_commit_diff_files USING btree (merge_request_context_commit_id, sha); +CREATE INDEX index_gpg_signatures_on_gpg_key_subkey_id ON gpg_signatures USING btree (gpg_key_subkey_id); -CREATE INDEX idx_mrs_on_target_id_and_created_at_and_state_id ON merge_requests USING btree (target_project_id, state_id, created_at, id); +CREATE INDEX index_gpg_signatures_on_project_id ON gpg_signatures USING btree (project_id); -CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name); +CREATE INDEX index_grafana_integrations_on_enabled ON grafana_integrations USING btree (enabled) WHERE (enabled IS TRUE); -CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_external_url ON external_approval_rules USING btree (project_id, external_url); +CREATE INDEX index_grafana_integrations_on_project_id ON grafana_integrations USING btree (project_id); -CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_name ON external_approval_rules USING btree (project_id, name); +CREATE INDEX index_group_crm_settings_on_group_id ON group_crm_settings USING btree (group_id); -CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_external_url ON external_status_checks USING btree (project_id, external_url); +CREATE UNIQUE INDEX index_group_custom_attributes_on_group_id_and_key ON group_custom_attributes USING btree (group_id, key); -CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_name ON external_status_checks USING btree (project_id, name); +CREATE INDEX index_group_custom_attributes_on_key_and_value ON group_custom_attributes USING btree (key, value); -CREATE INDEX idx_packages_build_infos_on_package_id ON packages_build_infos USING btree (package_id); +CREATE INDEX index_group_deletion_schedules_on_marked_for_deletion_on ON group_deletion_schedules USING btree (marked_for_deletion_on); -CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id); +CREATE INDEX index_group_deletion_schedules_on_user_id ON group_deletion_schedules USING btree (user_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 index_group_deploy_keys_group_on_group_deploy_key_and_group_ids ON group_deploy_keys_groups USING btree (group_id, group_deploy_key_id); -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 index_group_deploy_keys_groups_on_group_deploy_key_id ON group_deploy_keys_groups USING btree (group_deploy_key_id); -CREATE INDEX idx_pkgs_debian_group_distribution_keys_on_distribution_id ON packages_debian_group_distribution_keys USING btree (distribution_id); +CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint ON group_deploy_keys USING btree (fingerprint); -CREATE INDEX idx_pkgs_debian_project_distribution_keys_on_distribution_id ON packages_debian_project_distribution_keys USING btree (distribution_id); +CREATE INDEX index_group_deploy_keys_on_fingerprint_sha256 ON group_deploy_keys USING btree (fingerprint_sha256); -CREATE UNIQUE INDEX idx_pkgs_dep_links_on_pkg_id_dependency_id_dependency_type ON packages_dependency_links USING btree (package_id, dependency_id, dependency_type); +CREATE INDEX index_group_deploy_keys_on_user_id ON group_deploy_keys USING btree (user_id); -CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_cloud_last_sync_at, project_id) WHERE (jira_dvcs_cloud_last_sync_at IS NOT NULL); +CREATE INDEX index_group_deploy_tokens_on_deploy_token_id ON group_deploy_tokens USING btree (deploy_token_id); -CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_server_last_sync_at, project_id) WHERE (jira_dvcs_server_last_sync_at IS NOT NULL); +CREATE UNIQUE INDEX index_group_deploy_tokens_on_group_and_deploy_token_ids ON group_deploy_tokens USING btree (group_id, deploy_token_id); -CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_events ON self_managed_prometheus_alert_events USING btree (project_id, payload_key); +CREATE UNIQUE INDEX index_group_group_links_on_shared_group_and_shared_with_group ON group_group_links USING btree (shared_group_id, shared_with_group_id); -CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL); +CREATE INDEX index_group_group_links_on_shared_with_group_id ON group_group_links USING btree (shared_with_group_id); -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 index_group_import_states_on_group_id ON group_import_states USING btree (group_id); -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); +CREATE INDEX index_group_import_states_on_user_id ON group_import_states USING btree (user_id) WHERE (user_id IS NOT NULL); -CREATE INDEX idx_projects_on_repository_storage_last_repository_updated_at ON projects USING btree (id, repository_storage, last_repository_updated_at); +CREATE INDEX index_group_repository_storage_moves_on_group_id ON group_repository_storage_moves USING btree (group_id); -CREATE UNIQUE INDEX idx_protected_branch_id_external_approval_rule_id ON external_approval_rules_protected_branches USING btree (protected_branch_id, external_approval_rule_id); +CREATE UNIQUE INDEX index_group_stages_on_group_id_group_value_stream_id_and_name ON analytics_cycle_analytics_group_stages USING btree (group_id, group_value_stream_id, name); -CREATE INDEX idx_repository_states_on_last_repository_verification_ran_at ON project_repository_states USING btree (project_id, last_repository_verification_ran_at) WHERE ((repository_verification_checksum IS NOT NULL) AND (last_repository_verification_failure IS NULL)); +CREATE INDEX index_group_stages_on_stage_event_hash_id ON analytics_cycle_analytics_group_stages USING btree (stage_event_hash_id); -CREATE INDEX idx_repository_states_on_last_wiki_verification_ran_at ON project_repository_states USING btree (project_id, last_wiki_verification_ran_at) WHERE ((wiki_verification_checksum IS NOT NULL) AND (last_wiki_verification_failure IS NULL)); +CREATE UNIQUE INDEX index_group_user_callouts_feature ON user_group_callouts USING btree (user_id, feature_name, group_id); -CREATE INDEX idx_repository_states_on_repository_failure_partial ON project_repository_states USING btree (last_repository_verification_failure) WHERE (last_repository_verification_failure IS NOT NULL); +CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_repositories USING btree (disk_path); -CREATE INDEX idx_repository_states_on_wiki_failure_partial ON project_repository_states USING btree (last_wiki_verification_failure) WHERE (last_wiki_verification_failure IS NOT NULL); +CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id); -CREATE INDEX idx_repository_states_outdated_checksums ON project_repository_states USING btree (project_id) WHERE (((repository_verification_checksum IS NULL) AND (last_repository_verification_failure IS NULL)) OR ((wiki_verification_checksum IS NULL) AND (last_wiki_verification_failure IS NULL))); +CREATE INDEX index_historical_data_on_recorded_at ON historical_data USING btree (recorded_at); -CREATE UNIQUE INDEX idx_security_scans_on_build_and_scan_type ON security_scans USING btree (build_id, scan_type); +CREATE UNIQUE INDEX index_http_integrations_on_active_and_project_and_endpoint ON alert_management_http_integrations USING btree (active, project_id, endpoint_identifier) WHERE active; -CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan_type); +CREATE INDEX index_identities_on_saml_provider_id ON identities USING btree (saml_provider_id) WHERE (saml_provider_id IS NOT NULL); -CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id); +CREATE INDEX index_identities_on_user_id ON identities USING btree (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 INDEX index_im_issuable_escalation_statuses_on_policy_id ON incident_management_issuable_escalation_statuses USING btree (policy_id); -CREATE UNIQUE INDEX idx_vuln_signatures_uniqueness_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, algorithm_type, signature_sha); +CREATE UNIQUE INDEX index_im_oncall_schedules_on_project_id_and_iid ON incident_management_oncall_schedules USING btree (project_id, iid); -CREATE INDEX idx_vulnerabilities_partial_devops_adoption ON vulnerabilities USING btree (project_id, created_at) WHERE (state <> 1); +CREATE INDEX index_im_timeline_events_author_id ON incident_management_timeline_events USING btree (author_id); -CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue ON vulnerability_external_issue_links USING btree (vulnerability_id, external_type, external_project_key, external_issue_key); +CREATE INDEX index_im_timeline_events_issue_id ON incident_management_timeline_events USING btree (issue_id); -CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_link_type ON vulnerability_external_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 1); +CREATE INDEX index_im_timeline_events_project_id ON incident_management_timeline_events USING btree (project_id); -CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_issue_id ON vulnerability_issue_links USING btree (vulnerability_id, issue_id); +CREATE INDEX index_im_timeline_events_promoted_from_note_id ON incident_management_timeline_events USING btree (promoted_from_note_id); -CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_link_type ON vulnerability_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 2); +CREATE INDEX index_im_timeline_events_updated_by_user_id ON incident_management_timeline_events USING btree (updated_by_user_id); -CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (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 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_import_export_uploads_on_project_id ON import_export_uploads USING btree (project_id); -CREATE INDEX index_agent_group_authorizations_on_group_id ON agent_group_authorizations USING btree (group_id); +CREATE INDEX index_import_export_uploads_on_updated_at ON import_export_uploads USING btree (updated_at); -CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id); +CREATE INDEX index_import_failures_on_correlation_id_value ON import_failures USING btree (correlation_id_value); -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_import_failures_on_group_id_not_null ON import_failures USING btree (group_id) WHERE (group_id IS NOT NULL); -CREATE INDEX index_alert_management_alerts_on_domain ON alert_management_alerts USING btree (domain); +CREATE INDEX index_import_failures_on_project_id_and_correlation_id_value ON import_failures USING btree (project_id, correlation_id_value) WHERE (retry_count = 0); -CREATE INDEX index_alert_management_alerts_on_environment_id ON alert_management_alerts USING btree (environment_id) WHERE (environment_id IS NOT NULL); +CREATE INDEX index_import_failures_on_project_id_not_null ON import_failures USING btree (project_id) WHERE (project_id IS NOT NULL); -CREATE INDEX index_alert_management_alerts_on_issue_id ON alert_management_alerts USING btree (issue_id); +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 UNIQUE INDEX index_alert_management_alerts_on_project_id_and_iid ON alert_management_alerts USING btree (project_id, iid); +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_alert_management_alerts_on_prometheus_alert_id ON alert_management_alerts USING btree (prometheus_alert_id) WHERE (prometheus_alert_id IS NOT NULL); +CREATE INDEX index_in_product_marketing_emails_on_user_id ON in_product_marketing_emails USING btree (user_id); -CREATE INDEX index_alert_management_http_integrations_on_project_id ON alert_management_http_integrations USING btree (project_id); +CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_track_series ON in_product_marketing_emails USING btree (user_id, track, series); -CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id) WHERE (note_id IS NULL); +CREATE INDEX index_inc_mgmnt_oncall_participants_on_oncall_user_id ON incident_management_oncall_participants USING btree (user_id); -CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id_and_note_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id, note_id); +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id ON incident_management_oncall_participants USING btree (user_id, oncall_rotation_id); -CREATE UNIQUE INDEX index_alert_user_mentions_on_note_id ON alert_management_alert_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +CREATE INDEX index_inc_mgmnt_oncall_pcpnt_on_oncall_rotation_id_is_removed ON incident_management_oncall_participants USING btree (oncall_rotation_id, is_removed); -CREATE INDEX index_allowed_email_domains_on_group_id ON allowed_email_domains USING btree (group_id); +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id ON incident_management_oncall_rotations USING btree (oncall_schedule_id, id); -CREATE INDEX index_analytics_ca_group_stages_on_end_event_label_id ON analytics_cycle_analytics_group_stages USING btree (end_event_label_id); +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name ON incident_management_oncall_rotations USING btree (oncall_schedule_id, name); -CREATE INDEX index_analytics_ca_group_stages_on_group_id ON analytics_cycle_analytics_group_stages USING btree (group_id); +CREATE INDEX index_incident_management_oncall_schedules_on_project_id ON incident_management_oncall_schedules USING btree (project_id); -CREATE INDEX index_analytics_ca_group_stages_on_relative_position ON analytics_cycle_analytics_group_stages USING btree (relative_position); +CREATE INDEX index_incident_management_oncall_shifts_on_participant_id ON incident_management_oncall_shifts USING btree (participant_id); -CREATE INDEX index_analytics_ca_group_stages_on_start_event_label_id ON analytics_cycle_analytics_group_stages USING btree (start_event_label_id); +CREATE UNIQUE INDEX index_index_statuses_on_project_id ON index_statuses USING btree (project_id); -CREATE INDEX index_analytics_ca_group_stages_on_value_stream_id ON analytics_cycle_analytics_group_stages USING btree (group_value_stream_id); +CREATE INDEX index_insights_on_namespace_id ON insights USING btree (namespace_id); -CREATE UNIQUE INDEX index_analytics_ca_group_value_streams_on_group_id_and_name ON analytics_cycle_analytics_group_value_streams USING btree (group_id, name); +CREATE INDEX index_insights_on_project_id ON insights USING btree (project_id); -CREATE INDEX index_analytics_ca_project_stages_on_end_event_label_id ON analytics_cycle_analytics_project_stages USING btree (end_event_label_id); +CREATE INDEX index_integrations_on_inherit_from_id ON integrations USING btree (inherit_from_id); -CREATE INDEX index_analytics_ca_project_stages_on_project_id ON analytics_cycle_analytics_project_stages USING btree (project_id); +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_analytics_ca_project_stages_on_project_id_and_name ON analytics_cycle_analytics_project_stages USING btree (project_id, name); +CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_new_unique ON integrations USING btree (project_id, type_new); -CREATE INDEX index_analytics_ca_project_stages_on_relative_position ON analytics_cycle_analytics_project_stages USING btree (relative_position); +CREATE INDEX index_integrations_on_template ON integrations USING btree (template); -CREATE INDEX index_analytics_ca_project_stages_on_start_event_label_id ON analytics_cycle_analytics_project_stages USING btree (start_event_label_id); +CREATE INDEX index_integrations_on_type_new ON integrations USING btree (type_new); -CREATE INDEX index_analytics_ca_project_stages_on_value_stream_id ON analytics_cycle_analytics_project_stages USING btree (project_value_stream_id); +CREATE INDEX index_integrations_on_type_new_and_instance_partial ON integrations USING btree (type_new, instance) WHERE (instance = true); -CREATE UNIQUE INDEX index_analytics_ca_project_value_streams_on_project_id_and_name ON analytics_cycle_analytics_project_value_streams USING btree (project_id, name); +CREATE INDEX index_integrations_on_type_new_and_template_partial ON integrations USING btree (type_new, template) WHERE (template = true); -CREATE INDEX index_analytics_cycle_analytics_group_stages_custom_only ON analytics_cycle_analytics_group_stages USING btree (id) WHERE (custom = true); +CREATE INDEX index_integrations_on_type_new_id_when_active_and_has_project ON integrations USING btree (type_new, id) WHERE ((active = true) AND (project_id IS NOT NULL)); -CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON application_settings USING btree (custom_project_templates_group_id); +CREATE INDEX index_integrations_on_unique_group_id_and_type_new ON integrations USING btree (group_id, type_new); -CREATE INDEX index_application_settings_on_file_template_project_id ON application_settings USING btree (file_template_project_id); +CREATE INDEX index_internal_ids_on_namespace_id ON internal_ids USING btree (namespace_id); -CREATE INDEX index_application_settings_on_instance_administrators_group_id ON application_settings USING btree (instance_administrators_group_id); +CREATE INDEX index_internal_ids_on_project_id ON internal_ids USING btree (project_id); -CREATE UNIQUE INDEX index_application_settings_on_push_rule_id ON application_settings USING btree (push_rule_id); +CREATE UNIQUE INDEX index_internal_ids_on_usage_and_namespace_id ON internal_ids USING btree (usage, namespace_id) WHERE (namespace_id IS NOT NULL); -CREATE INDEX index_application_settings_on_usage_stats_set_by_user_id ON application_settings USING btree (usage_stats_set_by_user_id); +CREATE UNIQUE INDEX index_internal_ids_on_usage_and_project_id ON internal_ids USING btree (usage, project_id) WHERE (project_id IS NOT NULL); -CREATE INDEX index_applicationsettings_on_instance_administration_project_id ON application_settings USING btree (instance_administration_project_id); +CREATE INDEX index_ip_restrictions_on_group_id ON ip_restrictions USING btree (group_id); -CREATE UNIQUE INDEX index_approval_merge_request_rule_sources_1 ON approval_merge_request_rule_sources USING btree (approval_merge_request_rule_id); +CREATE INDEX index_issuable_metric_images_on_issue_id ON issuable_metric_images USING btree (issue_id); -CREATE INDEX index_approval_merge_request_rule_sources_2 ON approval_merge_request_rule_sources USING btree (approval_project_rule_id); +CREATE UNIQUE INDEX index_issuable_severities_on_issue_id ON issuable_severities USING btree (issue_id); -CREATE UNIQUE INDEX index_approval_merge_request_rules_approved_approvers_1 ON approval_merge_request_rules_approved_approvers USING btree (approval_merge_request_rule_id, user_id); +CREATE INDEX index_issuable_slas_on_due_at_id_label_applied_issuable_closed ON issuable_slas USING btree (due_at, id) WHERE ((label_applied = false) AND (issuable_closed = false)); -CREATE INDEX index_approval_merge_request_rules_approved_approvers_2 ON approval_merge_request_rules_approved_approvers USING btree (user_id); +CREATE UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree (issue_id); -CREATE UNIQUE INDEX index_approval_merge_request_rules_groups_1 ON approval_merge_request_rules_groups USING btree (approval_merge_request_rule_id, group_id); +CREATE INDEX index_issue_assignees_on_user_id ON issue_assignees USING btree (user_id); -CREATE INDEX index_approval_merge_request_rules_groups_2 ON approval_merge_request_rules_groups USING btree (group_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 UNIQUE INDEX index_approval_merge_request_rules_users_1 ON approval_merge_request_rules_users USING btree (approval_merge_request_rule_id, user_id); +CREATE INDEX index_issue_customer_relations_contacts_on_contact_id ON issue_customer_relations_contacts USING btree (contact_id); -CREATE INDEX index_approval_merge_request_rules_users_2 ON approval_merge_request_rules_users USING btree (user_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 UNIQUE INDEX index_approval_project_rules_groups_1 ON approval_project_rules_groups USING btree (approval_project_rule_id, group_id); +CREATE INDEX index_issue_emails_on_email_message_id ON issue_emails USING btree (email_message_id); -CREATE INDEX index_approval_project_rules_groups_2 ON approval_project_rules_groups USING btree (group_id); +CREATE INDEX index_issue_emails_on_issue_id ON issue_emails USING btree (issue_id); -CREATE INDEX index_approval_project_rules_on_id_with_regular_type ON approval_project_rules USING btree (id) WHERE (rule_type = 0); +CREATE INDEX index_issue_links_on_source_id ON issue_links USING btree (source_id); -CREATE INDEX index_approval_project_rules_on_project_id ON approval_project_rules USING btree (project_id); +CREATE UNIQUE INDEX index_issue_links_on_source_id_and_target_id ON issue_links USING btree (source_id, target_id); -CREATE INDEX index_approval_project_rules_on_rule_type ON approval_project_rules USING btree (rule_type); +CREATE INDEX index_issue_links_on_target_id ON issue_links USING btree (target_id); -CREATE INDEX index_approval_project_rules_protected_branches_pb_id ON approval_project_rules_protected_branches USING btree (protected_branch_id); +CREATE INDEX index_issue_metrics_on_issue_id_and_timestamps ON issue_metrics USING btree (issue_id, first_mentioned_in_commit_at, first_associated_with_milestone_at, first_added_to_board_at); -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_issue_on_project_id_state_id_and_blocking_issues_count ON issues USING btree (project_id, state_id, blocking_issues_count); -CREATE INDEX index_approval_project_rules_users_2 ON approval_project_rules_users USING btree (user_id); +CREATE INDEX index_issue_tracker_data_on_service_id ON issue_tracker_data USING btree (service_id); -CREATE INDEX index_approval_project_rules_users_on_approval_project_rule_id ON approval_project_rules_users USING btree (approval_project_rule_id); +CREATE UNIQUE INDEX index_issue_user_mentions_on_note_id ON issue_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); -CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, name) WHERE ((rule_type = 2) AND (section IS NULL)); +CREATE INDEX index_issues_on_author_id ON issues USING btree (author_id); -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_issues_on_author_id_and_id_and_created_at ON issues USING btree (author_id, id, created_at); -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_issues_on_closed_by_id ON issues USING btree (closed_by_id); -CREATE INDEX index_approvals_on_merge_request_id ON approvals USING btree (merge_request_id); +CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential); -CREATE INDEX index_approvals_on_merge_request_id_and_created_at ON approvals USING btree (merge_request_id, created_at); +CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops); -CREATE UNIQUE INDEX index_approvals_on_user_id_and_merge_request_id ON approvals USING btree (user_id, merge_request_id); +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_approver_groups_on_group_id ON approver_groups USING btree (group_id); +CREATE INDEX index_issues_on_id_and_weight ON issues USING btree (id, weight); -CREATE INDEX index_approver_groups_on_target_id_and_target_type ON approver_groups USING btree (target_id, target_type); +CREATE INDEX index_issues_on_incident_issue_type ON issues USING btree (issue_type) WHERE (issue_type = 1); -CREATE INDEX index_approvers_on_target_id_and_target_type ON approvers USING btree (target_id, target_type); +CREATE INDEX index_issues_on_last_edited_by_id ON issues USING btree (last_edited_by_id); -CREATE INDEX index_approvers_on_user_id ON approvers USING btree (user_id); +CREATE INDEX index_issues_on_milestone_id ON issues USING btree (milestone_id); -CREATE UNIQUE INDEX index_atlassian_identities_on_extern_uid ON atlassian_identities USING btree (extern_uid); +CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL); -CREATE INDEX index_authentication_events_on_provider ON authentication_events USING btree (provider); +CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at); -CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1); +CREATE INDEX index_issues_on_project_id_and_created_at_issue_type_incident ON issues USING btree (project_id, created_at) WHERE (issue_type = 1); -CREATE INDEX index_authentication_events_on_user_id ON authentication_events USING btree (user_id); +CREATE UNIQUE INDEX index_issues_on_project_id_and_external_key ON issues USING btree (project_id, external_key) WHERE (external_key IS NOT NULL); -CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON award_emoji USING btree (awardable_type, awardable_id); +CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid); -CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON aws_roles USING btree (role_external_id); +CREATE INDEX index_issues_on_project_id_and_state_id_and_created_at_and_id ON issues USING btree (project_id, state_id, created_at, id); -CREATE UNIQUE INDEX index_aws_roles_on_user_id ON aws_roles USING btree (user_id); +CREATE INDEX index_issues_on_project_id_and_upvotes_count ON issues USING btree (project_id, upvotes_count); -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_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL); -CREATE INDEX index_background_migration_jobs_on_class_name_and_arguments ON background_migration_jobs USING btree (class_name, arguments); +CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); -CREATE INDEX index_background_migration_jobs_on_class_name_and_status_and_id ON background_migration_jobs USING btree (class_name, status, id); +CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops); -CREATE INDEX index_badges_on_group_id ON badges USING btree (group_id); +CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at); -CREATE INDEX index_badges_on_project_id ON badges USING btree (project_id); +CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); -CREATE UNIQUE INDEX index_batched_background_migrations_on_unique_configuration ON batched_background_migrations USING btree (job_class_name, table_name, column_name, job_arguments); +CREATE INDEX index_issues_on_work_item_type_id ON issues USING btree (work_item_type_id); -CREATE INDEX index_batched_jobs_by_batched_migration_id_and_id ON batched_background_migration_jobs USING btree (batched_background_migration_id, id); +CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING btree (group_id); -CREATE INDEX index_batched_jobs_on_batched_migration_id_and_status ON batched_background_migration_jobs USING btree (batched_background_migration_id, status); +CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key); -CREATE INDEX index_board_assignees_on_assignee_id ON board_assignees USING btree (assignee_id); +CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id); -CREATE UNIQUE INDEX index_board_assignees_on_board_id_and_assignee_id ON board_assignees USING btree (board_id, assignee_id); +CREATE INDEX index_jira_imports_on_label_id ON jira_imports USING btree (label_id); -CREATE INDEX index_board_group_recent_visits_on_board_id ON board_group_recent_visits USING btree (board_id); +CREATE INDEX index_jira_imports_on_project_id_and_jira_project_key ON jira_imports USING btree (project_id, jira_project_key); -CREATE INDEX index_board_group_recent_visits_on_group_id ON board_group_recent_visits USING btree (group_id); +CREATE INDEX index_jira_imports_on_user_id ON jira_imports USING btree (user_id); -CREATE UNIQUE INDEX index_board_group_recent_visits_on_user_group_and_board ON board_group_recent_visits USING btree (user_id, group_id, board_id); +CREATE INDEX index_jira_tracker_data_on_service_id ON jira_tracker_data USING btree (service_id); -CREATE INDEX index_board_group_recent_visits_on_user_id ON board_group_recent_visits USING btree (user_id); +CREATE INDEX index_job_artifact_states_failed_verification ON ci_job_artifact_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -CREATE UNIQUE INDEX index_board_labels_on_board_id_and_label_id ON board_labels USING btree (board_id, label_id); +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_board_labels_on_label_id ON board_labels USING btree (label_id); +CREATE INDEX index_job_artifact_states_on_verification_state ON ci_job_artifact_states USING btree (verification_state); -CREATE INDEX index_board_project_recent_visits_on_board_id ON board_project_recent_visits USING btree (board_id); +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_board_project_recent_visits_on_project_id ON board_project_recent_visits USING btree (project_id); +CREATE INDEX index_keys_on_expires_at_and_id ON keys USING btree (date(timezone('UTC'::text, expires_at)), id) WHERE (expiry_notification_delivered_at IS NULL); -CREATE INDEX index_board_project_recent_visits_on_user_id ON board_project_recent_visits USING btree (user_id); +CREATE UNIQUE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint); -CREATE UNIQUE INDEX index_board_project_recent_visits_on_user_project_and_board ON board_project_recent_visits USING btree (user_id, project_id, board_id); +CREATE INDEX index_keys_on_fingerprint_sha256 ON keys USING btree (fingerprint_sha256); -CREATE INDEX index_board_user_preferences_on_board_id ON board_user_preferences USING btree (board_id); +CREATE INDEX index_keys_on_id_and_ldap_key_type ON keys USING btree (id) WHERE ((type)::text = 'LDAPKey'::text); -CREATE INDEX index_board_user_preferences_on_user_id ON board_user_preferences USING btree (user_id); +CREATE INDEX index_keys_on_last_used_at ON keys USING btree (last_used_at DESC NULLS LAST); -CREATE UNIQUE INDEX index_board_user_preferences_on_user_id_and_board_id ON board_user_preferences USING btree (user_id, board_id); +CREATE INDEX index_keys_on_user_id ON keys USING btree (user_id); -CREATE INDEX index_boards_epic_board_labels_on_epic_board_id ON boards_epic_board_labels USING btree (epic_board_id); +CREATE UNIQUE INDEX index_kubernetes_namespaces_on_cluster_project_environment_id ON clusters_kubernetes_namespaces USING btree (cluster_id, project_id, environment_id); -CREATE INDEX index_boards_epic_board_labels_on_label_id ON boards_epic_board_labels USING btree (label_id); +CREATE INDEX index_label_links_on_label_id_and_target_type ON label_links USING btree (label_id, target_type); -CREATE UNIQUE INDEX index_boards_epic_board_positions_on_epic_board_id_and_epic_id ON boards_epic_board_positions USING btree (epic_board_id, epic_id); +CREATE INDEX index_label_links_on_target_id_and_target_type ON label_links USING btree (target_id, target_type); -CREATE INDEX index_boards_epic_board_positions_on_epic_id ON boards_epic_board_positions USING btree (epic_id); +CREATE INDEX index_label_priorities_on_label_id ON label_priorities USING btree (label_id); -CREATE INDEX index_boards_epic_board_positions_on_scoped_relative_position ON boards_epic_board_positions USING btree (epic_board_id, epic_id, relative_position); +CREATE INDEX index_label_priorities_on_priority ON label_priorities USING btree (priority); -CREATE INDEX index_boards_epic_board_recent_visits_on_epic_board_id ON boards_epic_board_recent_visits USING btree (epic_board_id); +CREATE UNIQUE INDEX index_label_priorities_on_project_id_and_label_id ON label_priorities USING btree (project_id, label_id); -CREATE INDEX index_boards_epic_board_recent_visits_on_group_id ON boards_epic_board_recent_visits USING btree (group_id); +CREATE INDEX index_labels_on_group_id ON labels USING btree (group_id); -CREATE INDEX index_boards_epic_board_recent_visits_on_user_id ON boards_epic_board_recent_visits USING btree (user_id); +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_boards_epic_boards_on_group_id ON boards_epic_boards USING btree (group_id); +CREATE INDEX index_labels_on_project_id ON labels USING btree (project_id); -CREATE INDEX index_boards_epic_list_user_preferences_on_epic_list_id ON boards_epic_list_user_preferences USING btree (epic_list_id); +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_boards_epic_lists_on_epic_board_id ON boards_epic_lists USING btree (epic_board_id); +CREATE INDEX index_labels_on_template ON labels USING btree (template) WHERE template; -CREATE UNIQUE INDEX index_boards_epic_lists_on_epic_board_id_and_label_id ON boards_epic_lists USING btree (epic_board_id, label_id) WHERE (list_type = 1); +CREATE INDEX index_labels_on_title_varchar ON labels USING btree (title varchar_pattern_ops); -CREATE INDEX index_boards_epic_lists_on_label_id ON boards_epic_lists USING btree (label_id); +CREATE INDEX index_labels_on_type_and_project_id ON labels USING btree (type, project_id); -CREATE INDEX index_boards_epic_user_preferences_on_board_id ON boards_epic_user_preferences USING btree (board_id); +CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON lfs_file_locks USING btree (project_id, path); -CREATE UNIQUE INDEX index_boards_epic_user_preferences_on_board_user_epic_unique ON boards_epic_user_preferences USING btree (board_id, user_id, epic_id); +CREATE INDEX index_lfs_file_locks_on_user_id ON lfs_file_locks USING btree (user_id); -CREATE INDEX index_boards_epic_user_preferences_on_epic_id ON boards_epic_user_preferences USING btree (epic_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_boards_epic_user_preferences_on_user_id ON boards_epic_user_preferences USING btree (user_id); +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_boards_on_group_id ON boards USING btree (group_id); +CREATE INDEX index_lfs_object_states_on_lfs_object_id ON lfs_object_states USING btree (lfs_object_id); -CREATE INDEX index_boards_on_iteration_cadence_id ON boards USING btree (iteration_cadence_id); +CREATE INDEX index_lfs_object_states_on_verification_state ON lfs_object_states USING btree (verification_state); -CREATE INDEX index_boards_on_iteration_id ON boards USING btree (iteration_id); +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_boards_on_milestone_id ON boards USING btree (milestone_id); +CREATE INDEX index_lfs_objects_on_file_store ON lfs_objects USING btree (file_store); -CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); +CREATE UNIQUE INDEX index_lfs_objects_on_oid ON lfs_objects USING btree (oid); -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_lfs_objects_projects_on_lfs_object_id ON lfs_objects_projects USING btree (lfs_object_id); -CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); +CREATE INDEX index_lfs_objects_projects_on_project_id_and_lfs_object_id ON lfs_objects_projects USING btree (project_id, lfs_object_id); -CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status); +CREATE INDEX index_list_user_preferences_on_list_id ON list_user_preferences USING btree (list_id); -CREATE INDEX index_bulk_import_entities_on_namespace_id ON bulk_import_entities USING btree (namespace_id); +CREATE INDEX index_list_user_preferences_on_user_id ON list_user_preferences USING btree (user_id); -CREATE INDEX index_bulk_import_entities_on_parent_id ON bulk_import_entities USING btree (parent_id); +CREATE UNIQUE INDEX index_list_user_preferences_on_user_id_and_list_id ON list_user_preferences USING btree (user_id, list_id); -CREATE INDEX index_bulk_import_entities_on_project_id ON bulk_import_entities USING btree (project_id); +CREATE UNIQUE INDEX index_lists_on_board_id_and_label_id ON lists USING btree (board_id, label_id); -CREATE INDEX index_bulk_import_export_uploads_on_export_id ON bulk_import_export_uploads USING btree (export_id); +CREATE INDEX index_lists_on_iteration_id ON lists USING btree (iteration_id); -CREATE INDEX index_bulk_import_failures_on_bulk_import_entity_id ON bulk_import_failures USING btree (bulk_import_entity_id); +CREATE INDEX index_lists_on_label_id ON lists USING btree (label_id); -CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_failures USING btree (correlation_id_value); +CREATE INDEX index_lists_on_list_type ON lists USING btree (list_type); -CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id); +CREATE INDEX index_lists_on_milestone_id ON lists USING btree (milestone_id); -CREATE UNIQUE INDEX index_chat_names_on_service_id_and_team_id_and_chat_id ON chat_names USING btree (service_id, team_id, chat_id); +CREATE INDEX index_lists_on_user_id ON lists USING btree (user_id); -CREATE UNIQUE INDEX index_chat_names_on_user_id_and_service_id ON chat_names USING btree (user_id, service_id); +CREATE INDEX index_member_tasks_on_member_id ON member_tasks USING btree (member_id); -CREATE UNIQUE INDEX index_chat_teams_on_namespace_id ON chat_teams USING btree (namespace_id); +CREATE UNIQUE INDEX index_member_tasks_on_member_id_and_project_id ON member_tasks USING btree (member_id, project_id); -CREATE UNIQUE INDEX index_ci_build_needs_on_build_id_and_name ON ci_build_needs USING btree (build_id, name); +CREATE INDEX index_member_tasks_on_project_id ON member_tasks USING btree (project_id); -CREATE UNIQUE INDEX index_ci_build_pending_states_on_build_id ON ci_build_pending_states USING btree (build_id); +CREATE INDEX index_members_on_access_level ON members USING btree (access_level); -CREATE INDEX index_ci_build_report_results_on_project_id ON ci_build_report_results USING btree (project_id); +CREATE INDEX index_members_on_expires_at ON members USING btree (expires_at); -CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON ci_build_trace_chunks USING btree (build_id, chunk_index); +CREATE INDEX index_members_on_invite_email ON members USING btree (invite_email); -CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id); +CREATE UNIQUE INDEX index_members_on_invite_token ON members USING btree (invite_token); -CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id ON ci_builds_metadata USING btree (build_id); +CREATE INDEX index_members_on_member_namespace_id ON members USING btree (member_namespace_id); -CREATE INDEX index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts ON ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE); +CREATE INDEX index_members_on_requested_at ON members USING btree (requested_at); -CREATE INDEX index_ci_builds_metadata_on_build_id_and_id_and_interruptible ON ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true); +CREATE INDEX index_members_on_source_id_and_source_type ON members USING btree (source_id, source_type); -CREATE INDEX index_ci_builds_metadata_on_project_id ON ci_builds_metadata USING btree (project_id); +CREATE INDEX index_members_on_user_id_and_access_level_requested_at_is_null ON members USING btree (user_id, access_level) WHERE (requested_at IS NULL); -CREATE INDEX index_ci_builds_on_auto_canceled_by_id ON ci_builds USING btree (auto_canceled_by_id); +CREATE INDEX index_members_on_user_id_created_at ON members USING btree (user_id, created_at) WHERE ((ldap = true) AND ((type)::text = 'GroupMember'::text) AND ((source_type)::text = 'Namespace'::text)); -CREATE INDEX index_ci_builds_on_commit_id_and_stage_idx_and_created_at ON ci_builds USING btree (commit_id, stage_idx, created_at); +CREATE INDEX index_members_on_user_id_source_id_source_type ON members USING btree (user_id, source_id, source_type); -CREATE INDEX index_ci_builds_on_commit_id_and_status_and_type ON ci_builds USING btree (commit_id, status, type); +CREATE INDEX index_merge_request_assignees_on_merge_request_id ON merge_request_assignees USING btree (merge_request_id); -CREATE INDEX index_ci_builds_on_commit_id_and_type_and_name_and_ref ON ci_builds USING btree (commit_id, type, name, ref); +CREATE UNIQUE INDEX index_merge_request_assignees_on_merge_request_id_and_user_id ON merge_request_assignees USING btree (merge_request_id, user_id); -CREATE INDEX index_ci_builds_on_commit_id_and_type_and_ref ON ci_builds USING btree (commit_id, type, ref); +CREATE INDEX index_merge_request_assignees_on_user_id ON merge_request_assignees USING btree (user_id); -CREATE INDEX index_ci_builds_on_commit_id_artifacts_expired_at_and_id ON ci_builds USING btree (commit_id, artifacts_expire_at, id) WHERE (((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('dependency_scanning'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text]))); +CREATE INDEX index_merge_request_blocks_on_blocked_merge_request_id ON merge_request_blocks USING btree (blocked_merge_request_id); -CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (project_id, id); +CREATE UNIQUE INDEX index_merge_request_cleanup_schedules_on_merge_request_id ON merge_request_cleanup_schedules USING btree (merge_request_id); -CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL))); +CREATE INDEX index_merge_request_cleanup_schedules_on_status ON merge_request_cleanup_schedules USING btree (status); -CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_builds USING btree (project_id) WHERE (((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND ((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text)); +CREATE 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_ci_builds_on_queued_at ON ci_builds USING btree (queued_at); +CREATE INDEX index_merge_request_diff_commits_on_sha ON merge_request_diff_commits USING btree (sha); -CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC); +CREATE INDEX index_merge_request_diff_details_failed_verification ON merge_request_diff_details USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id); +CREATE INDEX index_merge_request_diff_details_needs_verification ON merge_request_diff_details USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -CREATE INDEX index_ci_builds_on_status_and_type_and_runner_id ON ci_builds USING btree (status, type, runner_id); +CREATE INDEX index_merge_request_diff_details_on_merge_request_diff_id ON merge_request_diff_details USING btree (merge_request_diff_id); -CREATE UNIQUE INDEX index_ci_builds_on_token_encrypted ON ci_builds USING btree (token_encrypted) WHERE (token_encrypted IS NOT NULL); +CREATE INDEX index_merge_request_diff_details_on_verification_state ON merge_request_diff_details USING btree (verification_state); -CREATE UNIQUE INDEX index_ci_builds_on_token_partial ON ci_builds USING btree (token) WHERE (token IS NOT NULL); +CREATE INDEX index_merge_request_diff_details_pending_verification ON merge_request_diff_details USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -CREATE INDEX index_ci_builds_on_updated_at ON ci_builds USING btree (updated_at); +CREATE INDEX index_merge_request_diffs_by_id_partial ON merge_request_diffs USING btree (id) WHERE ((files_count > 0) AND ((NOT stored_externally) OR (stored_externally IS NULL))); -CREATE INDEX index_ci_builds_on_upstream_pipeline_id ON ci_builds USING btree (upstream_pipeline_id) WHERE (upstream_pipeline_id IS NOT NULL); +CREATE INDEX index_merge_request_diffs_on_external_diff_store ON merge_request_diffs USING btree (external_diff_store); -CREATE INDEX index_ci_builds_on_user_id ON ci_builds USING btree (user_id); +CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON merge_request_diffs USING btree (merge_request_id, id); -CREATE INDEX index_ci_builds_on_user_id_and_created_at_and_type_eq_ci_build ON ci_builds USING btree (user_id, created_at) WHERE ((type)::text = 'Ci::Build'::text); +CREATE UNIQUE INDEX index_merge_request_diffs_on_unique_merge_request_id ON merge_request_diffs USING btree (merge_request_id) WHERE (diff_type = 2); -CREATE INDEX index_ci_builds_project_id_and_status_for_live_jobs_partial2 ON ci_builds USING btree (project_id, status) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text]))); +CREATE INDEX index_merge_request_metrics_on_first_deployed_to_production_at ON merge_request_metrics USING btree (first_deployed_to_production_at); -CREATE INDEX index_ci_builds_runner_id_pending_covering ON ci_builds USING btree (runner_id, id) INCLUDE (project_id) WHERE (((status)::text = 'pending'::text) AND ((type)::text = 'Ci::Build'::text)); +CREATE INDEX index_merge_request_metrics_on_latest_closed_at ON merge_request_metrics USING btree (latest_closed_at) WHERE (latest_closed_at IS NOT NULL); -CREATE INDEX index_ci_builds_runner_id_running ON ci_builds USING btree (runner_id) WHERE (((status)::text = 'running'::text) AND ((type)::text = 'Ci::Build'::text)); +CREATE INDEX index_merge_request_metrics_on_latest_closed_by_id ON merge_request_metrics USING btree (latest_closed_by_id); -CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON ci_builds_runner_session USING btree (build_id); +CREATE INDEX index_merge_request_metrics_on_merge_request_id_and_merged_at ON merge_request_metrics USING btree (merge_request_id, merged_at) WHERE (merged_at IS NOT NULL); -CREATE INDEX index_ci_daily_build_group_report_results_on_group_id ON ci_daily_build_group_report_results USING btree (group_id); +CREATE INDEX index_merge_request_metrics_on_merged_at ON merge_request_metrics USING btree (merged_at); -CREATE INDEX index_ci_daily_build_group_report_results_on_last_pipeline_id ON ci_daily_build_group_report_results USING btree (last_pipeline_id); +CREATE INDEX index_merge_request_metrics_on_merged_by_id ON merge_request_metrics USING btree (merged_by_id); -CREATE INDEX index_ci_daily_build_group_report_results_on_project_and_date ON ci_daily_build_group_report_results USING btree (project_id, date DESC) WHERE ((default_branch = true) AND ((data -> 'coverage'::text) IS NOT NULL)); +CREATE INDEX index_merge_request_metrics_on_pipeline_id ON merge_request_metrics USING btree (pipeline_id); -CREATE INDEX index_ci_deleted_objects_on_pick_up_at ON ci_deleted_objects USING btree (pick_up_at); +CREATE INDEX index_merge_request_metrics_on_target_project_id ON merge_request_metrics USING btree (target_project_id); -CREATE INDEX index_ci_freeze_periods_on_project_id ON ci_freeze_periods USING btree (project_id); +CREATE UNIQUE INDEX index_merge_request_reviewers_on_merge_request_id_and_user_id ON merge_request_reviewers USING btree (merge_request_id, user_id); -CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key_and_environment ON ci_group_variables USING btree (group_id, key, environment_scope); +CREATE INDEX index_merge_request_reviewers_on_user_id ON merge_request_reviewers USING btree (user_id); -CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON ci_instance_variables USING btree (key); +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_ci_job_artifacts_for_terraform_reports ON ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18); +CREATE INDEX index_merge_requests_closing_issues_on_issue_id ON merge_requests_closing_issues USING btree (issue_id); -CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON ci_job_artifacts USING btree (id) WHERE (file_type = 18); +CREATE INDEX index_merge_requests_closing_issues_on_merge_request_id ON merge_requests_closing_issues USING btree (merge_request_id); -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_merge_requests_compliance_violations_on_violating_user_id ON merge_requests_compliance_violations USING btree (violating_user_id); -CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btree (file_store); +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_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_merge_requests_on_assignee_id ON merge_requests USING btree (assignee_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_merge_requests_on_author_id ON merge_requests USING btree (author_id); -CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id); +CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at); -CREATE INDEX index_ci_job_artifacts_on_project_id_for_security_reports ON ci_job_artifacts USING btree (project_id) WHERE (file_type = ANY (ARRAY[5, 6, 7, 8])); +CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops); -CREATE INDEX index_ci_job_token_project_scope_links_on_added_by_id ON ci_job_token_project_scope_links USING btree (added_by_id); +CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id); -CREATE INDEX index_ci_job_token_project_scope_links_on_target_project_id ON ci_job_token_project_scope_links USING btree (target_project_id); +CREATE INDEX index_merge_requests_on_latest_merge_request_diff_id ON merge_requests USING btree (latest_merge_request_diff_id); -CREATE INDEX index_ci_job_variables_on_job_id ON ci_job_variables USING btree (job_id); +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 UNIQUE INDEX index_ci_job_variables_on_key_and_job_id ON ci_job_variables USING btree (key, job_id); +CREATE INDEX index_merge_requests_on_milestone_id ON merge_requests USING btree (milestone_id); -CREATE INDEX index_ci_minutes_additional_packs_on_namespace_id_purchase_xid ON ci_minutes_additional_packs USING btree (namespace_id, purchase_xid); +CREATE INDEX index_merge_requests_on_source_branch ON merge_requests USING btree (source_branch); -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_merge_requests_on_source_project_id_and_source_branch ON merge_requests USING btree (source_project_id, source_branch); -CREATE INDEX index_ci_pending_builds_id_on_protected_partial ON ci_pending_builds USING btree (id) WHERE (protected = true); +CREATE INDEX index_merge_requests_on_sprint_id ON merge_requests USING btree (sprint_id); -CREATE UNIQUE INDEX index_ci_pending_builds_on_build_id ON ci_pending_builds USING btree (build_id); +CREATE INDEX index_merge_requests_on_target_branch ON merge_requests USING btree (target_branch); -CREATE INDEX index_ci_pending_builds_on_namespace_id ON ci_pending_builds USING btree (namespace_id); +CREATE INDEX index_merge_requests_on_target_project_id_and_created_at_and_id ON merge_requests USING btree (target_project_id, created_at, id); -CREATE INDEX index_ci_pending_builds_on_project_id ON ci_pending_builds USING btree (project_id); +CREATE UNIQUE INDEX index_merge_requests_on_target_project_id_and_iid ON merge_requests USING btree (target_project_id, iid); -CREATE INDEX index_ci_pending_builds_on_tag_ids ON ci_pending_builds USING btree (tag_ids) WHERE (cardinality(tag_ids) > 0); +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_ci_pipeline_artifacts_failed_verification ON ci_pipeline_artifacts USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); +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_ci_pipeline_artifacts_needs_verification ON ci_pipeline_artifacts USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); +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_ci_pipeline_artifacts_on_expire_at ON ci_pipeline_artifacts USING btree (expire_at); +CREATE INDEX index_merge_requests_on_target_project_id_and_squash_commit_sha ON merge_requests USING btree (target_project_id, squash_commit_sha); -CREATE INDEX index_ci_pipeline_artifacts_on_pipeline_id ON ci_pipeline_artifacts USING btree (pipeline_id); +CREATE INDEX index_merge_requests_on_target_project_id_and_target_branch ON merge_requests USING btree (target_project_id, target_branch) WHERE ((state_id = 1) AND (merge_when_pipeline_succeeds = true)); -CREATE UNIQUE INDEX index_ci_pipeline_artifacts_on_pipeline_id_and_file_type ON ci_pipeline_artifacts USING btree (pipeline_id, file_type); +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_ci_pipeline_artifacts_on_project_id ON ci_pipeline_artifacts USING btree (project_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_ci_pipeline_artifacts_pending_verification ON ci_pipeline_artifacts USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); +CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops); -CREATE INDEX index_ci_pipeline_artifacts_verification_state ON ci_pipeline_artifacts USING btree (verification_state); +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); -CREATE INDEX index_ci_pipeline_chat_data_on_chat_name_id ON ci_pipeline_chat_data USING btree (chat_name_id); +CREATE INDEX index_merge_requests_on_updated_by_id ON merge_requests USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); -CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_chat_data USING btree (pipeline_id); +CREATE UNIQUE INDEX index_merge_trains_on_merge_request_id ON merge_trains USING btree (merge_request_id); -CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id); +CREATE INDEX index_merge_trains_on_pipeline_id ON merge_trains USING btree (pipeline_id); -CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key); +CREATE INDEX index_merge_trains_on_user_id ON merge_trains USING btree (user_id); -CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active); +CREATE INDEX index_metrics_dashboard_annotations_on_cluster_id_and_3_columns ON metrics_dashboard_annotations USING btree (cluster_id, dashboard_path, starting_at, ending_at) WHERE (cluster_id IS NOT NULL); -CREATE INDEX index_ci_pipeline_schedules_on_owner_id ON ci_pipeline_schedules USING btree (owner_id); +CREATE INDEX index_metrics_dashboard_annotations_on_environment_id_and_3_col ON metrics_dashboard_annotations USING btree (environment_id, dashboard_path, starting_at, ending_at) WHERE (environment_id IS NOT NULL); -CREATE INDEX index_ci_pipeline_schedules_on_owner_id_and_id_and_active ON ci_pipeline_schedules USING btree (owner_id, id) WHERE (active = true); +CREATE INDEX index_metrics_dashboard_annotations_on_timespan_end ON metrics_dashboard_annotations USING btree (COALESCE(ending_at, starting_at)); -CREATE INDEX index_ci_pipeline_schedules_on_project_id ON ci_pipeline_schedules USING btree (project_id); +CREATE INDEX index_metrics_users_starred_dashboards_on_project_id ON metrics_users_starred_dashboards USING btree (project_id); -CREATE UNIQUE INDEX index_ci_pipeline_variables_on_pipeline_id_and_key ON ci_pipeline_variables USING btree (pipeline_id, key); +CREATE INDEX index_migration_jobs_on_migration_id_and_finished_at ON batched_background_migration_jobs USING btree (batched_background_migration_id, finished_at); -CREATE INDEX index_ci_pipelines_config_on_pipeline_id ON ci_pipelines_config USING btree (pipeline_id); +CREATE INDEX index_migration_jobs_on_migration_id_and_max_value ON batched_background_migration_jobs USING btree (batched_background_migration_id, max_value); -CREATE INDEX index_ci_pipelines_for_ondemand_dast_scans ON ci_pipelines USING btree (id) WHERE (source = 13); +CREATE INDEX index_milestone_releases_on_release_id ON milestone_releases USING btree (release_id); -CREATE INDEX index_ci_pipelines_on_auto_canceled_by_id ON ci_pipelines USING btree (auto_canceled_by_id); +CREATE INDEX index_milestones_on_description_trigram ON milestones USING gin (description gin_trgm_ops); -CREATE INDEX index_ci_pipelines_on_ci_ref_id_and_more ON ci_pipelines USING btree (ci_ref_id, id DESC, source, status) WHERE (ci_ref_id IS NOT NULL); +CREATE INDEX index_milestones_on_due_date ON milestones USING btree (due_date); -CREATE INDEX index_ci_pipelines_on_external_pull_request_id ON ci_pipelines USING btree (external_pull_request_id) WHERE (external_pull_request_id IS NOT NULL); +CREATE INDEX index_milestones_on_group_id ON milestones USING btree (group_id); -CREATE INDEX index_ci_pipelines_on_merge_request_id ON ci_pipelines USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); +CREATE UNIQUE INDEX index_milestones_on_project_id_and_iid ON milestones USING btree (project_id, iid); -CREATE INDEX index_ci_pipelines_on_pipeline_schedule_id_and_id ON ci_pipelines USING btree (pipeline_schedule_id, id); +CREATE INDEX index_milestones_on_title ON milestones USING btree (title); -CREATE INDEX index_ci_pipelines_on_project_id_and_id_desc ON ci_pipelines USING btree (project_id, id DESC); +CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gin_trgm_ops); -CREATE UNIQUE INDEX index_ci_pipelines_on_project_id_and_iid ON ci_pipelines USING btree (project_id, iid) WHERE (iid IS NOT NULL); +CREATE INDEX index_mirror_data_non_scheduled_or_started ON project_mirror_data USING btree (next_execution_timestamp, retry_count) WHERE ((status)::text <> ALL ('{scheduled,started}'::text[])); -CREATE INDEX index_ci_pipelines_on_project_id_and_ref_and_status_and_id ON ci_pipelines USING btree (project_id, ref, status, id); +CREATE UNIQUE INDEX index_mr_blocks_on_blocking_and_blocked_mr_ids ON merge_request_blocks USING btree (blocking_merge_request_id, blocked_merge_request_id); -CREATE INDEX index_ci_pipelines_on_project_id_and_sha ON ci_pipelines USING btree (project_id, sha); +CREATE INDEX index_mr_cleanup_schedules_timestamps_status ON merge_request_cleanup_schedules USING btree (scheduled_at) WHERE ((completed_at IS NULL) AND (status = 0)); -CREATE INDEX index_ci_pipelines_on_project_id_and_source ON ci_pipelines USING btree (project_id, source); +CREATE UNIQUE INDEX index_mr_context_commits_on_merge_request_id_and_sha ON merge_request_context_commits USING btree (merge_request_id, sha); -CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_config_source ON ci_pipelines USING btree (project_id, status, config_source); +CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_nulls_last ON merge_request_metrics USING btree (target_project_id, merged_at DESC NULLS LAST, id DESC); -CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_created_at ON ci_pipelines USING btree (project_id, status, created_at); +CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_time_to_merge ON merge_request_metrics USING btree (target_project_id, merged_at, created_at) WHERE (merged_at > created_at); -CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_updated_at ON ci_pipelines USING btree (project_id, status, updated_at); +CREATE INDEX index_namespace_admin_notes_on_namespace_id ON namespace_admin_notes USING btree (namespace_id); -CREATE INDEX index_ci_pipelines_on_project_id_and_user_id_and_status_and_ref ON ci_pipelines USING btree (project_id, user_id, status, ref) WHERE (source <> 12); +CREATE UNIQUE INDEX index_namespace_aggregation_schedules_on_namespace_id ON namespace_aggregation_schedules USING btree (namespace_id); -CREATE INDEX index_ci_pipelines_on_project_idandrefandiddesc ON ci_pipelines USING btree (project_id, ref, id DESC); +CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id); -CREATE INDEX index_ci_pipelines_on_status_and_id ON ci_pipelines USING btree (status, id); +CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id); -CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_config_source ON ci_pipelines USING btree (user_id, created_at, config_source); +CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree (id) WHERE (parent_id IS NOT NULL); -CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipelines USING btree (user_id, created_at, source); +CREATE INDEX index_namespaces_id_parent_id_is_null ON namespaces USING btree (id) WHERE (parent_id IS NULL); -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 UNIQUE INDEX index_namespaces_name_parent_id_type ON namespaces USING btree (name, parent_id, type); -CREATE UNIQUE INDEX index_ci_project_monthly_usages_on_project_id_and_date ON ci_project_monthly_usages USING btree (project_id, date); +CREATE INDEX index_namespaces_on_created_at ON namespaces USING btree (created_at); -CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_path ON ci_refs USING btree (project_id, ref_path); +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); -CREATE UNIQUE INDEX index_ci_resource_groups_on_project_id_and_key ON ci_resource_groups USING btree (project_id, key); +CREATE INDEX index_namespaces_on_file_template_project_id ON namespaces USING btree (file_template_project_id); -CREATE INDEX index_ci_resources_on_build_id ON ci_resources USING btree (build_id); +CREATE INDEX index_namespaces_on_ldap_sync_last_successful_update_at ON namespaces USING btree (ldap_sync_last_successful_update_at); -CREATE UNIQUE INDEX index_ci_resources_on_resource_group_id_and_build_id ON ci_resources USING btree (resource_group_id, build_id); +CREATE INDEX index_namespaces_on_ldap_sync_last_update_at ON namespaces USING btree (ldap_sync_last_update_at); -CREATE INDEX index_ci_runner_namespaces_on_namespace_id ON ci_runner_namespaces USING btree (namespace_id); +CREATE INDEX index_namespaces_on_name_trigram ON namespaces USING gin (name gin_trgm_ops); -CREATE UNIQUE INDEX index_ci_runner_namespaces_on_runner_id_and_namespace_id ON ci_runner_namespaces USING btree (runner_id, namespace_id); +CREATE INDEX index_namespaces_on_owner_id ON namespaces USING btree (owner_id); -CREATE INDEX index_ci_runner_projects_on_project_id ON ci_runner_projects USING btree (project_id); +CREATE UNIQUE INDEX index_namespaces_on_parent_id_and_id ON namespaces USING btree (parent_id, id); -CREATE INDEX index_ci_runner_projects_on_runner_id ON ci_runner_projects USING btree (runner_id); +CREATE INDEX index_namespaces_on_path ON namespaces USING btree (path); -CREATE INDEX index_ci_runners_on_contacted_at_and_id_desc ON ci_runners USING btree (contacted_at, id DESC); +CREATE INDEX index_namespaces_on_path_trigram ON namespaces USING gin (path gin_trgm_ops); -CREATE INDEX index_ci_runners_on_contacted_at_desc_and_id_desc ON ci_runners USING btree (contacted_at DESC, id DESC); +CREATE UNIQUE INDEX index_namespaces_on_push_rule_id ON namespaces USING btree (push_rule_id); -CREATE INDEX index_ci_runners_on_created_at_and_id_desc ON ci_runners USING btree (created_at, id DESC); +CREATE INDEX index_namespaces_on_require_two_factor_authentication ON namespaces USING btree (require_two_factor_authentication); -CREATE INDEX index_ci_runners_on_created_at_desc_and_id_desc ON ci_runners USING btree (created_at DESC, id DESC); +CREATE UNIQUE INDEX index_namespaces_on_runners_token ON namespaces USING btree (runners_token); -CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops); +CREATE UNIQUE INDEX index_namespaces_on_runners_token_encrypted ON namespaces USING btree (runners_token_encrypted); -CREATE INDEX index_ci_runners_on_locked ON ci_runners USING btree (locked); +CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON namespaces USING btree (shared_runners_minutes_limit, extra_shared_runners_minutes_limit); -CREATE INDEX index_ci_runners_on_runner_type ON ci_runners USING btree (runner_type); +CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversal_ids); -CREATE INDEX index_ci_runners_on_token ON ci_runners USING btree (token); +CREATE INDEX index_namespaces_on_traversal_ids_for_groups ON namespaces USING gin (traversal_ids) WHERE ((type)::text = 'Group'::text); -CREATE INDEX index_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted); +CREATE INDEX index_namespaces_on_type_and_id ON namespaces USING btree (type, id); -CREATE UNIQUE INDEX index_ci_running_builds_on_build_id ON ci_running_builds USING btree (build_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_ci_running_builds_on_project_id ON ci_running_builds USING btree (project_id); +CREATE INDEX index_namespaces_sync_events_on_namespace_id ON namespaces_sync_events USING btree (namespace_id); -CREATE INDEX index_ci_running_builds_on_runner_id ON ci_running_builds USING btree (runner_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)); -CREATE INDEX index_ci_sources_pipelines_on_pipeline_id ON ci_sources_pipelines USING btree (pipeline_id); +CREATE UNIQUE INDEX index_note_diff_files_on_diff_note_id ON note_diff_files USING btree (diff_note_id); -CREATE INDEX index_ci_sources_pipelines_on_project_id ON ci_sources_pipelines USING btree (project_id); +CREATE INDEX index_notes_for_cherry_picked_merge_requests ON notes USING btree (project_id, commit_id) WHERE ((noteable_type)::text = 'MergeRequest'::text); -CREATE INDEX index_ci_sources_pipelines_on_source_job_id ON ci_sources_pipelines USING btree (source_job_id); +CREATE INDEX index_notes_on_author_id_and_created_at_and_id ON notes USING btree (author_id, created_at, id); -CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id ON ci_sources_pipelines USING btree (source_pipeline_id); +CREATE INDEX index_notes_on_commit_id ON notes USING btree (commit_id); -CREATE INDEX index_ci_sources_pipelines_on_source_project_id ON ci_sources_pipelines USING btree (source_project_id); +CREATE INDEX index_notes_on_created_at ON notes USING btree (created_at); -CREATE INDEX index_ci_sources_projects_on_pipeline_id ON ci_sources_projects USING btree (pipeline_id); +CREATE INDEX index_notes_on_discussion_id ON notes USING btree (discussion_id); -CREATE UNIQUE INDEX index_ci_sources_projects_on_source_project_id_and_pipeline_id ON ci_sources_projects USING btree (source_project_id, pipeline_id); +CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code); -CREATE INDEX index_ci_stages_on_pipeline_id ON ci_stages USING btree (pipeline_id); +CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system); -CREATE INDEX index_ci_stages_on_pipeline_id_and_id ON ci_stages USING btree (pipeline_id, id) WHERE (status = ANY (ARRAY[0, 1, 2, 8, 9, 10])); +CREATE INDEX index_notes_on_project_id_and_id_and_system_false ON notes USING btree (project_id, id) WHERE (NOT system); -CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_and_name ON ci_stages USING btree (pipeline_id, name); +CREATE INDEX index_notes_on_project_id_and_noteable_type ON notes USING btree (project_id, noteable_type); -CREATE INDEX index_ci_stages_on_pipeline_id_and_position ON ci_stages USING btree (pipeline_id, "position"); +CREATE INDEX index_notes_on_review_id ON notes USING btree (review_id); -CREATE INDEX index_ci_stages_on_project_id ON ci_stages USING btree (project_id); +CREATE INDEX index_notification_settings_on_source_and_level_and_user ON notification_settings USING btree (source_id, source_type, level, user_id); -CREATE INDEX index_ci_subscriptions_projects_on_upstream_project_id ON ci_subscriptions_projects USING btree (upstream_project_id); +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_ci_subscriptions_projects_unique_subscription ON ci_subscriptions_projects USING btree (downstream_project_id, upstream_project_id); +CREATE INDEX index_oauth_access_grants_on_resource_owner_id ON oauth_access_grants USING btree (resource_owner_id, application_id, created_at); -CREATE INDEX index_ci_trigger_requests_on_commit_id ON ci_trigger_requests USING btree (commit_id); +CREATE UNIQUE INDEX index_oauth_access_grants_on_token ON oauth_access_grants USING btree (token); -CREATE INDEX index_ci_trigger_requests_on_trigger_id_and_id ON ci_trigger_requests USING btree (trigger_id, id DESC); +CREATE INDEX index_oauth_access_tokens_on_application_id ON oauth_access_tokens USING btree (application_id); -CREATE INDEX index_ci_triggers_on_owner_id ON ci_triggers USING btree (owner_id); +CREATE UNIQUE INDEX index_oauth_access_tokens_on_refresh_token ON oauth_access_tokens USING btree (refresh_token); -CREATE INDEX index_ci_triggers_on_project_id ON ci_triggers USING btree (project_id); +CREATE INDEX index_oauth_access_tokens_on_resource_owner_id ON oauth_access_tokens USING btree (resource_owner_id); -CREATE INDEX index_ci_unit_test_failures_on_build_id ON ci_unit_test_failures USING btree (build_id); +CREATE UNIQUE INDEX index_oauth_access_tokens_on_token ON oauth_access_tokens USING btree (token); -CREATE UNIQUE INDEX index_ci_unit_tests_on_project_id_and_key_hash ON ci_unit_tests USING btree (project_id, key_hash); +CREATE INDEX index_oauth_applications_on_owner_id_and_owner_type ON oauth_applications USING btree (owner_id, owner_type); -CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key); +CREATE UNIQUE INDEX index_oauth_applications_on_uid ON oauth_applications USING btree (uid); -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_oauth_openid_requests_on_access_grant_id ON oauth_openid_requests USING btree (access_grant_id); -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 UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON keys USING btree (id, type) WHERE (public = true); -CREATE INDEX index_cluster_agent_tokens_on_created_by_user_id ON cluster_agent_tokens USING btree (created_by_user_id); +CREATE INDEX index_on_group_id_on_webhooks ON web_hooks USING btree (group_id); -CREATE UNIQUE INDEX index_cluster_agent_tokens_on_token_encrypted ON cluster_agent_tokens USING btree (token_encrypted); +CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USING btree (lower((extern_uid)::text), provider); -CREATE INDEX index_cluster_agents_on_created_by_user_id ON cluster_agents USING btree (created_by_user_id); +CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_usage_trends_measurements USING btree (identifier, recorded_at); -CREATE UNIQUE INDEX index_cluster_agents_on_project_id_and_name ON cluster_agents USING btree (project_id, name); +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 UNIQUE INDEX index_cluster_groups_on_cluster_id_and_group_id ON cluster_groups USING btree (cluster_id, group_id); +CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type); -CREATE INDEX index_cluster_groups_on_group_id ON cluster_groups USING btree (group_id); +CREATE INDEX index_on_merge_request_assignees_state ON merge_request_assignees USING btree (state) WHERE (state = 2); -CREATE UNIQUE INDEX index_cluster_platforms_kubernetes_on_cluster_id ON cluster_platforms_kubernetes USING btree (cluster_id); +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_cluster_projects_on_cluster_id ON cluster_projects USING btree (cluster_id); +CREATE INDEX index_on_merge_request_reviewers_state ON merge_request_reviewers USING btree (state) WHERE (state = 2); -CREATE INDEX index_cluster_projects_on_project_id ON cluster_projects USING btree (project_id); +CREATE INDEX index_on_merge_request_reviewers_updated_state_by_user_id ON merge_request_reviewers USING btree (updated_state_by_user_id); -CREATE UNIQUE INDEX index_cluster_providers_aws_on_cluster_id ON cluster_providers_aws USING btree (cluster_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); -CREATE INDEX index_cluster_providers_aws_on_cluster_id_and_status ON cluster_providers_aws USING btree (cluster_id, status); +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_cluster_providers_gcp_on_cloud_run ON cluster_providers_gcp USING btree (cloud_run); +CREATE INDEX index_on_namespaces_lower_name ON namespaces USING btree (lower((name)::text)); -CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON cluster_providers_gcp USING btree (cluster_id); +CREATE INDEX index_on_namespaces_lower_path ON namespaces USING btree (lower((path)::text)); -CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON clusters_applications_cert_managers USING btree (cluster_id); +CREATE INDEX index_on_oncall_schedule_escalation_rule ON incident_management_escalation_rules USING btree (oncall_schedule_id); -CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON clusters_applications_cilium USING btree (cluster_id); +CREATE INDEX index_on_pages_metadata_not_migrated ON project_pages_metadata USING btree (project_id) WHERE ((deployed = true) AND (pages_deployment_id IS NULL)); -CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clusters_applications_crossplane USING btree (cluster_id); +CREATE UNIQUE INDEX index_on_project_id_escalation_policy_name_unique ON incident_management_escalation_policies USING btree (project_id, name); -CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id); +CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text)); -CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id); +CREATE INDEX index_on_projects_path ON projects USING btree (path); -CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id); +CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text)); -CREATE UNIQUE INDEX index_clusters_applications_jupyter_on_cluster_id ON clusters_applications_jupyter USING btree (cluster_id); +CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text)); -CREATE INDEX index_clusters_applications_jupyter_on_oauth_application_id ON clusters_applications_jupyter USING btree (oauth_application_id); +CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text)); -CREATE UNIQUE INDEX index_clusters_applications_knative_on_cluster_id ON clusters_applications_knative USING btree (cluster_id); +CREATE INDEX index_on_users_name_lower ON users USING btree (lower((name)::text)); -CREATE UNIQUE INDEX index_clusters_applications_prometheus_on_cluster_id ON clusters_applications_prometheus USING btree (cluster_id); +CREATE INDEX index_onboarding_progresses_for_create_track ON onboarding_progresses USING btree (created_at) WHERE (git_write_at IS NULL); -CREATE UNIQUE INDEX index_clusters_applications_runners_on_cluster_id ON clusters_applications_runners USING btree (cluster_id); +CREATE INDEX index_onboarding_progresses_for_team_track ON onboarding_progresses USING btree (GREATEST(git_write_at, pipeline_created_at, trial_started_at)) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NOT NULL) AND (trial_started_at IS NOT NULL) AND (user_added_at IS NULL)); -CREATE INDEX index_clusters_applications_runners_on_runner_id ON clusters_applications_runners USING btree (runner_id); +CREATE INDEX index_onboarding_progresses_for_trial_track ON onboarding_progresses USING btree (GREATEST(git_write_at, pipeline_created_at)) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NOT NULL) AND (trial_started_at IS NULL)); -CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_id ON clusters_kubernetes_namespaces USING btree (cluster_id); +CREATE INDEX index_onboarding_progresses_for_verify_track ON onboarding_progresses USING btree (git_write_at) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NULL)); -CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_project_id ON clusters_kubernetes_namespaces USING btree (cluster_project_id); +CREATE UNIQUE INDEX index_onboarding_progresses_on_namespace_id ON onboarding_progresses USING btree (namespace_id); -CREATE INDEX index_clusters_kubernetes_namespaces_on_environment_id ON clusters_kubernetes_namespaces USING btree (environment_id); +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_clusters_kubernetes_namespaces_on_project_id ON clusters_kubernetes_namespaces USING btree (project_id); +CREATE INDEX index_operations_feature_flags_issues_on_issue_id ON operations_feature_flags_issues USING btree (issue_id); -CREATE INDEX index_clusters_on_enabled_and_provider_type_and_id ON clusters USING btree (enabled, provider_type, id); +CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_iid ON operations_feature_flags USING btree (project_id, iid); -CREATE INDEX index_clusters_on_enabled_cluster_type_id_and_created_at ON clusters USING btree (enabled, cluster_type, id, created_at); +CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_name ON operations_feature_flags USING btree (project_id, name); -CREATE INDEX index_clusters_on_management_project_id ON clusters USING btree (management_project_id) WHERE (management_project_id IS NOT NULL); +CREATE UNIQUE INDEX index_operations_scopes_on_strategy_id_and_environment_scope ON operations_scopes USING btree (strategy_id, environment_scope); -CREATE INDEX index_clusters_on_user_id ON clusters USING btree (user_id); +CREATE INDEX index_operations_strategies_on_feature_flag_id ON operations_strategies USING btree (feature_flag_id); -CREATE UNIQUE INDEX index_commit_user_mentions_on_note_id ON commit_user_mentions USING btree (note_id); +CREATE INDEX index_operations_strategies_user_lists_on_user_list_id ON operations_strategies_user_lists USING btree (user_list_id); -CREATE INDEX index_compliance_frameworks_id_where_frameworks_not_null ON compliance_management_frameworks USING btree (id) WHERE (pipeline_configuration_full_path IS NOT NULL); +CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_iid ON operations_user_lists USING btree (project_id, iid); -CREATE INDEX index_composer_cache_files_where_namespace_id_is_null ON packages_composer_cache_files USING btree (id) WHERE (namespace_id IS NULL); +CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_name ON operations_user_lists USING btree (project_id, name); -CREATE INDEX index_container_expiration_policies_on_next_run_at_and_enabled ON container_expiration_policies USING btree (next_run_at, enabled); +CREATE UNIQUE INDEX index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id ON operations_feature_flags_issues USING btree (feature_flag_id, issue_id); -CREATE INDEX index_container_repositories_on_project_id ON container_repositories USING btree (project_id); +CREATE UNIQUE INDEX index_ops_strategies_user_lists_on_strategy_id_and_user_list_id ON operations_strategies_user_lists USING btree (strategy_id, user_list_id); -CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repositories USING btree (project_id, id); +CREATE INDEX index_packages_build_infos_on_pipeline_id ON packages_build_infos USING btree (pipeline_id); -CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON container_repositories USING btree (project_id, name); +CREATE INDEX index_packages_build_infos_package_id_pipeline_id ON packages_build_infos USING btree (package_id, pipeline_id); -CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops); +CREATE UNIQUE INDEX index_packages_composer_cache_namespace_and_sha ON packages_composer_cache_files USING btree (namespace_id, file_sha256); -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 UNIQUE INDEX index_packages_composer_metadata_on_package_id_and_target_sha ON packages_composer_metadata USING btree (package_id, target_sha); -CREATE INDEX index_csv_issue_imports_on_project_id ON csv_issue_imports USING btree (project_id); +CREATE UNIQUE INDEX index_packages_conan_file_metadata_on_package_file_id ON packages_conan_file_metadata USING btree (package_file_id); -CREATE INDEX index_csv_issue_imports_on_user_id ON csv_issue_imports USING btree (user_id); +CREATE UNIQUE INDEX index_packages_conan_metadata_on_package_id_username_channel ON packages_conan_metadata USING btree (package_id, package_username, package_channel); -CREATE INDEX index_custom_emoji_on_creator_id ON custom_emoji USING btree (creator_id); +CREATE INDEX index_packages_debian_group_component_files_on_component_id ON packages_debian_group_component_files USING btree (component_id); -CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON custom_emoji USING btree (namespace_id, name); +CREATE INDEX index_packages_debian_group_distributions_on_creator_id ON packages_debian_group_distributions USING btree (creator_id); -CREATE INDEX index_customer_relations_contacts_on_group_id ON customer_relations_contacts USING btree (group_id); +CREATE INDEX index_packages_debian_group_distributions_on_group_id ON packages_debian_group_distributions USING btree (group_id); -CREATE INDEX index_customer_relations_contacts_on_organization_id ON customer_relations_contacts USING btree (organization_id); +CREATE INDEX index_packages_debian_project_component_files_on_component_id ON packages_debian_project_component_files USING btree (component_id); -CREATE UNIQUE INDEX index_customer_relations_organizations_on_unique_name_per_group ON customer_relations_organizations USING btree (group_id, lower(name)); +CREATE INDEX index_packages_debian_project_distributions_on_creator_id ON packages_debian_project_distributions USING btree (creator_id); -CREATE UNIQUE INDEX index_cycle_analytics_stage_event_hashes_on_hash_sha_256 ON analytics_cycle_analytics_stage_event_hashes USING btree (hash_sha256); +CREATE INDEX index_packages_debian_project_distributions_on_project_id ON packages_debian_project_distributions USING btree (project_id); -CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); +CREATE INDEX index_packages_debian_publications_on_distribution_id ON packages_debian_publications USING btree (distribution_id); -CREATE INDEX index_dast_profile_schedules_active_next_run_at ON dast_profile_schedules USING btree (active, next_run_at); +CREATE UNIQUE INDEX index_packages_debian_publications_on_package_id ON packages_debian_publications USING btree (package_id); -CREATE UNIQUE INDEX index_dast_profile_schedules_on_dast_profile_id ON dast_profile_schedules USING btree (dast_profile_id); +CREATE UNIQUE INDEX index_packages_dependencies_on_name_and_version_pattern ON packages_dependencies USING btree (name, version_pattern); -CREATE INDEX index_dast_profile_schedules_on_project_id ON dast_profile_schedules USING btree (project_id); +CREATE INDEX index_packages_dependency_links_on_dependency_id ON packages_dependency_links USING btree (dependency_id); -CREATE INDEX index_dast_profile_schedules_on_user_id ON dast_profile_schedules USING btree (user_id); +CREATE INDEX index_packages_events_on_package_id ON packages_events USING btree (package_id); -CREATE INDEX index_dast_profiles_on_dast_scanner_profile_id ON dast_profiles USING btree (dast_scanner_profile_id); +CREATE INDEX index_packages_helm_file_metadata_on_channel ON packages_helm_file_metadata USING btree (channel); -CREATE INDEX index_dast_profiles_on_dast_site_profile_id ON dast_profiles USING btree (dast_site_profile_id); +CREATE INDEX index_packages_helm_file_metadata_on_pf_id_and_channel ON packages_helm_file_metadata USING btree (package_file_id, channel); -CREATE UNIQUE INDEX index_dast_profiles_on_project_id_and_name ON dast_profiles USING btree (project_id, name); +CREATE INDEX index_packages_maven_metadata_on_package_id_and_path ON packages_maven_metadata USING btree (package_id, path); -CREATE UNIQUE INDEX index_dast_profiles_pipelines_on_ci_pipeline_id ON dast_profiles_pipelines USING btree (ci_pipeline_id); +CREATE INDEX index_packages_maven_metadata_on_path ON packages_maven_metadata USING btree (path); -CREATE UNIQUE INDEX index_dast_scanner_profiles_on_project_id_and_name ON dast_scanner_profiles USING btree (project_id, name); +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_dast_site_profiles_on_dast_site_id ON dast_site_profiles USING btree (dast_site_id); +CREATE INDEX index_packages_package_file_build_infos_on_package_file_id ON packages_package_file_build_infos USING btree (package_file_id); -CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site_profiles USING btree (project_id, name); +CREATE INDEX index_packages_package_file_build_infos_on_pipeline_id ON packages_package_file_build_infos USING btree (pipeline_id); -CREATE UNIQUE INDEX index_dast_site_profiles_pipelines_on_ci_pipeline_id ON dast_site_profiles_pipelines USING btree (ci_pipeline_id); +CREATE INDEX index_packages_package_files_on_file_store ON packages_package_files USING btree (file_store); -CREATE UNIQUE INDEX index_dast_site_token_on_token ON dast_site_tokens USING btree (token); +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_dast_site_tokens_on_project_id ON dast_site_tokens USING btree (project_id); +CREATE INDEX index_packages_package_files_on_package_id_id ON packages_package_files USING btree (package_id, id); -CREATE INDEX index_dast_site_validations_on_dast_site_token_id ON dast_site_validations USING btree (dast_site_token_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_dast_site_validations_on_url_base_and_state ON dast_site_validations USING btree (url_base, state); +CREATE INDEX index_packages_package_files_on_status ON packages_package_files USING btree (status); -CREATE INDEX index_dast_sites_on_dast_site_validation_id ON dast_sites USING btree (dast_site_validation_id); +CREATE INDEX index_packages_package_files_on_verification_state ON packages_package_files USING btree (verification_state); -CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING btree (project_id, url); +CREATE INDEX index_packages_packages_on_creator_id ON packages_packages USING btree (creator_id); -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 INDEX index_packages_packages_on_id_and_created_at ON packages_packages USING btree (id, created_at); -CREATE INDEX index_dep_ci_build_trace_sections_on_project_id ON dep_ci_build_trace_sections USING btree (project_id); +CREATE INDEX index_packages_packages_on_name_trigram ON packages_packages USING gin (name gin_trgm_ops); -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_packages_packages_on_project_id_and_created_at ON packages_packages USING btree (project_id, created_at); -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_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type); -CREATE INDEX index_dependency_proxy_group_settings_on_group_id ON dependency_proxy_group_settings USING btree (group_id); +CREATE INDEX index_packages_packages_on_project_id_and_status ON packages_packages USING btree (project_id, status); -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_packages_packages_on_project_id_and_version ON packages_packages USING btree (project_id, version); -CREATE INDEX index_deploy_key_id_on_protected_branch_push_access_levels ON protected_branch_push_access_levels USING btree (deploy_key_id); +CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4)); -CREATE INDEX index_deploy_keys_projects_on_deploy_key_id ON deploy_keys_projects USING btree (deploy_key_id); +CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (package_id); -CREATE INDEX index_deploy_keys_projects_on_project_id ON deploy_keys_projects USING btree (project_id); +CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC); -CREATE UNIQUE INDEX index_deploy_tokens_on_token ON deploy_tokens USING btree (token); +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_deploy_tokens_on_token_and_expires_at_and_id ON deploy_tokens USING btree (token, expires_at, id) WHERE (revoked IS FALSE); +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 UNIQUE INDEX index_deploy_tokens_on_token_encrypted ON deploy_tokens USING btree (token_encrypted); +CREATE INDEX index_pages_deployment_states_on_pages_deployment_id ON pages_deployment_states USING btree (pages_deployment_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_pages_deployment_states_on_verification_state ON pages_deployment_states USING btree (verification_state); -CREATE INDEX index_deployment_merge_requests_on_merge_request_id ON deployment_merge_requests USING btree (merge_request_id); +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_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status); +CREATE INDEX index_pages_deployments_on_ci_build_id ON pages_deployments USING btree (ci_build_id); -CREATE INDEX index_deployments_on_created_at ON deployments USING btree (created_at); +CREATE INDEX index_pages_deployments_on_file_store_and_id ON pages_deployments USING btree (file_store, id); -CREATE INDEX index_deployments_on_deployable_type_and_deployable_id ON deployments USING btree (deployable_type, deployable_id); +CREATE INDEX index_pages_deployments_on_project_id ON pages_deployments USING btree (project_id); -CREATE INDEX index_deployments_on_environment_id_and_id ON deployments USING btree (environment_id, id); +CREATE INDEX index_pages_domain_acme_orders_on_challenge_token ON pages_domain_acme_orders USING btree (challenge_token); -CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON deployments USING btree (environment_id, iid, project_id); +CREATE INDEX index_pages_domain_acme_orders_on_pages_domain_id ON pages_domain_acme_orders USING btree (pages_domain_id); -CREATE INDEX index_deployments_on_environment_id_status_and_finished_at ON deployments USING btree (environment_id, status, finished_at); +CREATE INDEX index_pages_domains_need_auto_ssl_renewal_user_provided ON pages_domains USING btree (id) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false) AND (certificate_source = 0)); -CREATE INDEX index_deployments_on_environment_id_status_and_id ON deployments USING btree (environment_id, status, id); +CREATE INDEX index_pages_domains_need_auto_ssl_renewal_valid_not_after ON pages_domains USING btree (certificate_valid_not_after) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false)); -CREATE INDEX index_deployments_on_environment_status_sha ON deployments USING btree (environment_id, status, sha); +CREATE UNIQUE INDEX index_pages_domains_on_domain_and_wildcard ON pages_domains USING btree (domain, wildcard); -CREATE INDEX index_deployments_on_id_and_status_and_created_at ON deployments USING btree (id, status, created_at); +CREATE INDEX index_pages_domains_on_domain_lowercase ON pages_domains USING btree (lower((domain)::text)); -CREATE INDEX index_deployments_on_id_where_cluster_id_present ON deployments USING btree (id) WHERE (cluster_id IS NOT NULL); +CREATE INDEX index_pages_domains_on_project_id ON pages_domains USING btree (project_id); -CREATE INDEX index_deployments_on_project_and_environment_and_updated_at_id ON deployments USING btree (project_id, environment_id, updated_at, id); +CREATE INDEX index_pages_domains_on_project_id_and_enabled_until ON pages_domains USING btree (project_id, enabled_until); -CREATE INDEX index_deployments_on_project_and_finished ON deployments USING btree (project_id, finished_at) WHERE (status = 2); +CREATE INDEX index_pages_domains_on_remove_at ON pages_domains USING btree (remove_at); -CREATE INDEX index_deployments_on_project_id_and_id ON deployments USING btree (project_id, id DESC); +CREATE INDEX index_pages_domains_on_scope ON pages_domains USING btree (scope); -CREATE UNIQUE INDEX index_deployments_on_project_id_and_iid ON deployments USING btree (project_id, iid); +CREATE INDEX index_pages_domains_on_usage ON pages_domains USING btree (usage); -CREATE INDEX index_deployments_on_project_id_and_ref ON deployments USING btree (project_id, ref); +CREATE INDEX index_pages_domains_on_verified_at ON pages_domains USING btree (verified_at); -CREATE INDEX index_deployments_on_project_id_and_status ON deployments USING btree (project_id, status); +CREATE INDEX index_pages_domains_on_verified_at_and_enabled_until ON pages_domains USING btree (verified_at, enabled_until); -CREATE INDEX index_deployments_on_project_id_and_status_and_created_at ON deployments USING btree (project_id, status, created_at); +CREATE INDEX index_pages_domains_on_wildcard ON pages_domains USING btree (wildcard); -CREATE INDEX index_deployments_on_project_id_and_updated_at_and_id ON deployments USING btree (project_id, updated_at DESC, id DESC); +CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON alert_management_alerts USING btree (project_id, fingerprint) WHERE (status <> 2); -CREATE INDEX index_deployments_on_project_id_sha ON deployments USING btree (project_id, sha); +CREATE INDEX index_partial_ci_builds_on_user_id_name_parser_features ON ci_builds USING btree (user_id, name) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text]))); -CREATE INDEX index_deployments_on_user_id_and_status_and_created_at ON deployments USING btree (user_id, status, created_at); +CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at); -CREATE INDEX index_description_versions_on_epic_id ON description_versions USING btree (epic_id) WHERE (epic_id IS NOT NULL); +CREATE INDEX index_path_locks_on_path ON path_locks USING btree (path); -CREATE INDEX index_description_versions_on_issue_id ON description_versions USING btree (issue_id) WHERE (issue_id IS NOT NULL); +CREATE INDEX index_path_locks_on_project_id ON path_locks USING btree (project_id); -CREATE INDEX index_description_versions_on_merge_request_id ON description_versions USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); +CREATE INDEX index_path_locks_on_user_id ON path_locks USING btree (user_id); -CREATE INDEX index_design_management_designs_issue_id_relative_position_id ON design_management_designs USING btree (issue_id, relative_position, id); +CREATE UNIQUE INDEX index_personal_access_tokens_on_token_digest ON personal_access_tokens USING btree (token_digest); -CREATE UNIQUE INDEX index_design_management_designs_on_iid_and_project_id ON design_management_designs USING btree (project_id, iid); +CREATE INDEX index_personal_access_tokens_on_user_id ON personal_access_tokens USING btree (user_id); -CREATE UNIQUE INDEX index_design_management_designs_on_issue_id_and_filename ON design_management_designs USING btree (issue_id, filename); +CREATE UNIQUE INDEX index_plan_limits_on_plan_id ON plan_limits USING btree (plan_id); -CREATE INDEX index_design_management_designs_on_project_id ON design_management_designs USING btree (project_id); +CREATE UNIQUE INDEX index_plans_on_name ON plans USING btree (name); -CREATE INDEX index_design_management_designs_versions_on_design_id ON design_management_designs_versions USING btree (design_id); +CREATE UNIQUE INDEX index_pool_repositories_on_disk_path ON pool_repositories USING btree (disk_path); -CREATE INDEX index_design_management_designs_versions_on_event ON design_management_designs_versions USING btree (event); +CREATE INDEX index_pool_repositories_on_shard_id ON pool_repositories USING btree (shard_id); -CREATE INDEX index_design_management_designs_versions_on_version_id ON design_management_designs_versions USING btree (version_id); +CREATE UNIQUE INDEX index_pool_repositories_on_source_project_id_and_shard_id ON pool_repositories USING btree (source_project_id, shard_id); -CREATE INDEX index_design_management_versions_on_author_id ON design_management_versions USING btree (author_id) WHERE (author_id IS NOT NULL); +CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_indexes USING btree (name); -CREATE INDEX index_design_management_versions_on_issue_id ON design_management_versions USING btree (issue_id); +CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier); -CREATE UNIQUE INDEX index_design_management_versions_on_sha_and_issue_id ON design_management_versions USING btree (sha, issue_id); +CREATE INDEX index_postgres_reindex_queued_actions_on_state ON postgres_reindex_queued_actions USING btree (state); -CREATE UNIQUE INDEX index_design_user_mentions_on_note_id ON design_user_mentions USING btree (note_id); +CREATE UNIQUE INDEX index_programming_languages_on_name ON programming_languages USING btree (name); -CREATE UNIQUE INDEX index_diff_note_positions_on_note_id_and_diff_type ON diff_note_positions USING btree (note_id, diff_type); +CREATE INDEX index_project_access_tokens_on_project_id ON project_access_tokens USING btree (project_id); -CREATE UNIQUE INDEX index_dora_daily_metrics_on_environment_id_and_date ON dora_daily_metrics USING btree (environment_id, date); +CREATE UNIQUE INDEX index_project_aliases_on_name ON project_aliases USING btree (name); -CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id); +CREATE INDEX index_project_aliases_on_project_id ON project_aliases USING btree (project_id); -CREATE INDEX index_draft_notes_on_discussion_id ON draft_notes USING btree (discussion_id); +CREATE UNIQUE INDEX index_project_auto_devops_on_project_id ON project_auto_devops USING btree (project_id); -CREATE INDEX index_draft_notes_on_merge_request_id ON draft_notes USING btree (merge_request_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_elastic_index_settings_on_alias_name ON elastic_index_settings USING btree (alias_name); +CREATE UNIQUE INDEX index_project_ci_cd_settings_on_project_id ON project_ci_cd_settings USING btree (project_id); -CREATE INDEX index_elastic_reindexing_subtasks_on_elastic_reindexing_task_id ON elastic_reindexing_subtasks USING btree (elastic_reindexing_task_id); +CREATE UNIQUE INDEX index_project_ci_feature_usages_unique_columns ON project_ci_feature_usages USING btree (project_id, feature, default_branch); -CREATE UNIQUE INDEX index_elastic_reindexing_tasks_on_in_progress ON elastic_reindexing_tasks USING btree (in_progress) WHERE in_progress; +CREATE INDEX index_project_compliance_framework_settings_on_framework_id ON project_compliance_framework_settings USING btree (framework_id); -CREATE INDEX index_elastic_reindexing_tasks_on_state ON elastic_reindexing_tasks USING btree (state); +CREATE INDEX index_project_compliance_framework_settings_on_project_id ON project_compliance_framework_settings USING btree (project_id); -CREATE INDEX index_elasticsearch_indexed_namespaces_on_created_at ON elasticsearch_indexed_namespaces USING btree (created_at); +CREATE INDEX index_project_custom_attributes_on_key_and_value ON project_custom_attributes USING btree (key, value); -CREATE UNIQUE INDEX index_emails_on_confirmation_token ON emails USING btree (confirmation_token); +CREATE UNIQUE INDEX index_project_custom_attributes_on_project_id_and_key ON project_custom_attributes USING btree (project_id, key); -CREATE UNIQUE INDEX index_emails_on_email ON emails USING btree (email); +CREATE UNIQUE INDEX index_project_daily_statistics_on_project_id_and_date ON project_daily_statistics USING btree (project_id, date DESC); -CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id); +CREATE INDEX index_project_deploy_tokens_on_deploy_token_id ON project_deploy_tokens USING btree (deploy_token_id); -CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true); +CREATE UNIQUE INDEX index_project_deploy_tokens_on_project_id_and_deploy_token_id ON project_deploy_tokens USING btree (project_id, deploy_token_id); -CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops); +CREATE UNIQUE INDEX index_project_export_jobs_on_jid ON project_export_jobs USING btree (jid); -CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); +CREATE INDEX index_project_export_jobs_on_project_id_and_jid ON project_export_jobs USING btree (project_id, jid); -CREATE UNIQUE INDEX index_environments_on_project_id_and_slug ON environments USING btree (project_id, slug); +CREATE INDEX index_project_export_jobs_on_project_id_and_status ON project_export_jobs USING btree (project_id, status); -CREATE INDEX index_environments_on_project_id_and_tier ON environments USING btree (project_id, tier) WHERE (tier IS NOT NULL); +CREATE INDEX index_project_export_jobs_on_status ON project_export_jobs USING btree (status); -CREATE INDEX index_environments_on_project_id_state_environment_type ON environments USING btree (project_id, state, environment_type); +CREATE INDEX index_project_feature_usages_on_project_id ON project_feature_usages USING btree (project_id); -CREATE INDEX index_environments_on_state_and_auto_delete_at ON environments USING btree (auto_delete_at) WHERE ((auto_delete_at IS NOT NULL) AND ((state)::text = 'stopped'::text)); +CREATE UNIQUE INDEX index_project_features_on_project_id ON project_features USING btree (project_id); -CREATE INDEX index_environments_on_state_and_auto_stop_at ON environments USING btree (state, auto_stop_at) WHERE ((auto_stop_at IS NOT NULL) AND ((state)::text = 'available'::text)); +CREATE INDEX index_project_features_on_project_id_bal_20 ON project_features USING btree (project_id) WHERE (builds_access_level = 20); -CREATE UNIQUE INDEX index_epic_board_list_preferences_on_user_and_list ON boards_epic_list_user_preferences USING btree (user_id, epic_list_id); +CREATE UNIQUE INDEX index_project_features_on_project_id_include_container_registry ON project_features USING btree (project_id) INCLUDE (container_registry_access_level); -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); +COMMENT ON INDEX index_project_features_on_project_id_include_container_registry IS 'Included column (container_registry_access_level) improves performance of the ContainerRepository.for_group_and_its_subgroups scope query'; -CREATE INDEX index_epic_issues_on_epic_id ON epic_issues USING btree (epic_id); +CREATE INDEX index_project_features_on_project_id_ral_20 ON project_features USING btree (project_id) WHERE (repository_access_level = 20); -CREATE INDEX index_epic_issues_on_epic_id_and_issue_id ON epic_issues USING btree (epic_id, issue_id); +CREATE INDEX index_project_group_links_on_group_id ON project_group_links USING btree (group_id); -CREATE UNIQUE INDEX index_epic_issues_on_issue_id ON epic_issues USING btree (issue_id); +CREATE INDEX index_project_group_links_on_project_id ON project_group_links USING btree (project_id); -CREATE INDEX index_epic_metrics ON epic_metrics USING btree (epic_id); +CREATE INDEX index_project_import_data_on_project_id ON project_import_data USING btree (project_id); -CREATE UNIQUE INDEX index_epic_user_mentions_on_note_id ON epic_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +CREATE INDEX index_project_mirror_data_on_last_successful_update_at ON project_mirror_data USING btree (last_successful_update_at); -CREATE INDEX index_epics_on_assignee_id ON epics USING btree (assignee_id); +CREATE INDEX index_project_mirror_data_on_last_update_at_and_retry_count ON project_mirror_data USING btree (last_update_at, retry_count); -CREATE INDEX index_epics_on_author_id ON epics USING btree (author_id); +CREATE UNIQUE INDEX index_project_mirror_data_on_project_id ON project_mirror_data USING btree (project_id); -CREATE INDEX index_epics_on_closed_by_id ON epics USING btree (closed_by_id); +CREATE INDEX index_project_mirror_data_on_status ON project_mirror_data USING btree (status); -CREATE INDEX index_epics_on_confidential ON epics USING btree (confidential); +CREATE INDEX index_project_pages_metadata_on_artifacts_archive_id ON project_pages_metadata USING btree (artifacts_archive_id); -CREATE INDEX index_epics_on_due_date_sourcing_epic_id ON epics USING btree (due_date_sourcing_epic_id) WHERE (due_date_sourcing_epic_id IS NOT NULL); +CREATE INDEX index_project_pages_metadata_on_pages_deployment_id ON project_pages_metadata USING btree (pages_deployment_id); -CREATE INDEX index_epics_on_due_date_sourcing_milestone_id ON epics USING btree (due_date_sourcing_milestone_id); +CREATE INDEX index_project_pages_metadata_on_project_id_and_deployed_is_true ON project_pages_metadata USING btree (project_id) WHERE (deployed = true); -CREATE INDEX index_epics_on_end_date ON epics USING btree (end_date); +CREATE UNIQUE INDEX index_project_repositories_on_disk_path ON project_repositories USING btree (disk_path); -CREATE UNIQUE INDEX index_epics_on_group_id_and_external_key ON epics USING btree (group_id, external_key) WHERE (external_key IS NOT NULL); +CREATE UNIQUE INDEX index_project_repositories_on_project_id ON project_repositories USING btree (project_id); -CREATE UNIQUE INDEX index_epics_on_group_id_and_iid ON epics USING btree (group_id, iid); +CREATE INDEX index_project_repositories_on_shard_id ON project_repositories USING btree (shard_id); -CREATE INDEX index_epics_on_group_id_and_iid_varchar_pattern ON epics USING btree (group_id, ((iid)::character varying) varchar_pattern_ops); +CREATE INDEX index_project_repositories_on_shard_id_and_project_id ON project_repositories USING btree (shard_id, project_id); -CREATE INDEX index_epics_on_iid ON epics USING btree (iid); +CREATE UNIQUE INDEX index_project_repository_states_on_project_id ON project_repository_states USING btree (project_id); -CREATE INDEX index_epics_on_last_edited_by_id ON epics USING btree (last_edited_by_id); +CREATE INDEX index_project_repository_storage_moves_on_project_id ON project_repository_storage_moves USING btree (project_id); -CREATE INDEX index_epics_on_lock_version ON epics USING btree (lock_version) WHERE (lock_version IS NULL); +CREATE INDEX index_project_settings_on_project_id_partially ON project_settings USING btree (project_id) WHERE (has_vulnerabilities IS TRUE); -CREATE INDEX index_epics_on_parent_id ON epics USING btree (parent_id); +CREATE UNIQUE INDEX index_project_settings_on_push_rule_id ON project_settings USING btree (push_rule_id); -CREATE INDEX index_epics_on_start_date ON epics USING btree (start_date); +CREATE INDEX index_project_stages_on_stage_event_hash_id ON analytics_cycle_analytics_project_stages USING btree (stage_event_hash_id); -CREATE INDEX index_epics_on_start_date_sourcing_epic_id ON epics USING btree (start_date_sourcing_epic_id) WHERE (start_date_sourcing_epic_id IS NOT NULL); +CREATE INDEX index_project_statistics_on_namespace_id ON project_statistics USING btree (namespace_id); -CREATE INDEX index_epics_on_start_date_sourcing_milestone_id ON epics USING btree (start_date_sourcing_milestone_id); +CREATE INDEX index_project_statistics_on_packages_size_and_project_id ON project_statistics USING btree (packages_size, project_id); -CREATE INDEX index_error_tracking_client_keys_on_project_id ON error_tracking_client_keys USING btree (project_id); +CREATE UNIQUE INDEX index_project_statistics_on_project_id ON project_statistics USING btree (project_id); -CREATE INDEX index_error_tracking_error_events_on_error_id ON error_tracking_error_events USING btree (error_id); +CREATE INDEX index_project_statistics_on_repository_size_and_project_id ON project_statistics USING btree (repository_size, project_id); -CREATE INDEX index_error_tracking_errors_on_project_id ON error_tracking_errors USING btree (project_id); +CREATE INDEX index_project_statistics_on_storage_size_and_project_id ON project_statistics USING btree (storage_size, project_id); -CREATE INDEX index_esc_protected_branches_on_external_status_check_id ON external_status_checks_protected_branches USING btree (external_status_check_id); +CREATE INDEX index_project_statistics_on_wiki_size_and_project_id ON project_statistics USING btree (wiki_size, project_id); -CREATE INDEX index_esc_protected_branches_on_protected_branch_id ON external_status_checks_protected_branches USING btree (protected_branch_id); +CREATE INDEX index_project_topics_on_project_id ON project_topics USING btree (project_id); -CREATE UNIQUE INDEX index_escalation_rules_on_all_attributes ON incident_management_escalation_rules USING btree (policy_id, oncall_schedule_id, status, elapsed_time_seconds, user_id); +CREATE UNIQUE INDEX index_project_topics_on_project_id_and_topic_id ON project_topics USING btree (project_id, topic_id); -CREATE INDEX index_escalation_rules_on_user ON incident_management_escalation_rules USING btree (user_id); +CREATE INDEX index_project_topics_on_topic_id ON project_topics USING btree (topic_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 UNIQUE INDEX index_project_tracing_settings_on_project_id ON project_tracing_settings USING btree (project_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_projects_aimed_for_deletion ON projects USING btree (marked_for_deletion_at) WHERE ((marked_for_deletion_at IS NOT NULL) AND (pending_delete = false)); -CREATE INDEX index_et_errors_on_project_id_and_status_and_id ON error_tracking_errors USING btree (project_id, status, id); +CREATE INDEX index_projects_api_created_at_id_desc ON projects USING btree (created_at, 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_projects_api_last_activity_at_id_desc ON projects USING btree (last_activity_at, id DESC); -CREATE INDEX index_events_on_action ON events USING btree (action); +CREATE INDEX index_projects_api_name_id_desc ON projects USING btree (name, id DESC); -CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at); +CREATE INDEX index_projects_api_path_id_desc ON projects USING btree (path, id DESC); -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_projects_api_updated_at_id_desc ON projects USING btree (updated_at, id DESC); -CREATE INDEX index_events_on_author_id_and_project_id ON events USING btree (author_id, project_id); +CREATE INDEX index_projects_api_vis20_created_at ON projects USING btree (created_at, id) WHERE (visibility_level = 20); -CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL); +CREATE INDEX index_projects_api_vis20_last_activity_at ON projects USING btree (last_activity_at, id) WHERE (visibility_level = 20); -CREATE INDEX index_events_on_project_id_and_created_at ON events USING btree (project_id, created_at); +CREATE INDEX index_projects_api_vis20_name ON projects USING btree (name, id) WHERE (visibility_level = 20); -CREATE INDEX index_events_on_project_id_and_id ON events USING btree (project_id, id); +CREATE INDEX index_projects_api_vis20_path ON projects USING btree (path, id) WHERE (visibility_level = 20); -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_projects_api_vis20_updated_at ON projects USING btree (updated_at, id) WHERE (visibility_level = 20); -CREATE INDEX index_events_on_target_type_and_target_id ON events USING btree (target_type, target_id); +CREATE INDEX index_projects_not_aimed_for_deletion ON projects USING btree (id) WHERE (marked_for_deletion_at IS NULL); -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_projects_on_created_at_and_id ON projects USING btree (created_at, id); -CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id); +CREATE INDEX index_projects_on_creator_id_and_created_at_and_id ON projects USING btree (creator_id, created_at, id); -CREATE INDEX index_experiment_subjects_on_experiment_id ON experiment_subjects USING btree (experiment_id); +CREATE INDEX index_projects_on_creator_id_and_id ON projects USING btree (creator_id, id); -CREATE INDEX index_experiment_subjects_on_namespace_id ON experiment_subjects USING btree (namespace_id); +CREATE INDEX index_projects_on_creator_id_import_type_and_created_at_partial ON projects USING btree (creator_id, import_type, created_at) WHERE (import_type IS NOT NULL); -CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USING btree (project_id); +CREATE INDEX index_projects_on_description_trigram ON projects USING gin (description gin_trgm_ops); -CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id); +CREATE INDEX index_projects_on_id_and_archived_and_pending_delete ON projects USING btree (id) WHERE ((archived = false) AND (pending_delete = false)); -CREATE INDEX index_experiment_users_on_experiment_id ON experiment_users USING btree (experiment_id); +CREATE UNIQUE INDEX index_projects_on_id_partial_for_visibility ON projects USING btree (id) WHERE (visibility_level = ANY (ARRAY[10, 20])); -CREATE INDEX index_experiment_users_on_user_id ON experiment_users USING btree (user_id); +CREATE INDEX index_projects_on_id_service_desk_enabled ON projects USING btree (id) WHERE (service_desk_enabled = true); -CREATE UNIQUE INDEX index_experiments_on_name ON experiments USING btree (name); +CREATE INDEX index_projects_on_last_activity_at_and_id ON projects USING btree (last_activity_at, id); -CREATE INDEX index_expired_and_not_notified_personal_access_tokens ON personal_access_tokens USING btree (id, expires_at) WHERE ((impersonation = false) AND (revoked = false) AND (expire_notification_delivered = false)); +CREATE INDEX index_projects_on_last_repository_check_at ON projects USING btree (last_repository_check_at) WHERE (last_repository_check_at IS NOT NULL); -CREATE UNIQUE INDEX index_external_audit_event_destinations_on_namespace_id ON audit_events_external_audit_event_destinations USING btree (namespace_id, destination_url); +CREATE INDEX index_projects_on_last_repository_check_failed ON projects USING btree (last_repository_check_failed); -CREATE UNIQUE INDEX index_external_pull_requests_on_project_and_branches ON external_pull_requests USING btree (project_id, source_branch, target_branch); +CREATE INDEX index_projects_on_last_repository_updated_at ON projects USING btree (last_repository_updated_at); -CREATE UNIQUE INDEX index_feature_flag_scopes_on_flag_id_and_environment_scope ON operations_feature_flag_scopes USING btree (feature_flag_id, environment_scope); +CREATE INDEX index_projects_on_lower_name ON projects USING btree (lower((name)::text)); -CREATE UNIQUE INDEX index_feature_flags_clients_on_project_id_and_token_encrypted ON operations_feature_flags_clients USING btree (project_id, token_encrypted); +CREATE INDEX index_projects_on_marked_for_deletion_by_user_id ON projects USING btree (marked_for_deletion_by_user_id) WHERE (marked_for_deletion_by_user_id IS NOT NULL); -CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feature_gates USING btree (feature_key, key, value); +CREATE INDEX index_projects_on_mirror_creator_id_created_at ON projects USING btree (creator_id, created_at) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); -CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key); +CREATE INDEX index_projects_on_mirror_id_where_mirror_and_trigger_builds ON projects USING btree (id) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); -CREATE INDEX index_for_resource_group ON ci_builds USING btree (resource_group_id, id) WHERE (resource_group_id IS NOT NULL); +CREATE INDEX index_projects_on_mirror_last_successful_update_at ON projects USING btree (mirror_last_successful_update_at); -CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status); +CREATE INDEX index_projects_on_mirror_user_id ON projects USING btree (mirror_user_id); -CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id); +CREATE INDEX index_projects_on_name_and_id ON projects USING btree (name, id); -CREATE INDEX index_fork_network_members_on_forked_from_project_id ON fork_network_members USING btree (forked_from_project_id); +CREATE INDEX index_projects_on_name_trigram ON projects USING gin (name gin_trgm_ops); -CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_members USING btree (project_id); +CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (namespace_id, id); -CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id); +CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id); -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_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops); -CREATE INDEX index_geo_event_log_on_container_repository_updated_event_id ON geo_event_log USING btree (container_repository_updated_event_id); +CREATE INDEX index_projects_on_pending_delete ON projects USING btree (pending_delete); -CREATE INDEX index_geo_event_log_on_geo_event_id ON geo_event_log USING btree (geo_event_id) WHERE (geo_event_id IS NOT NULL); +CREATE INDEX index_projects_on_pool_repository_id ON projects USING btree (pool_repository_id) WHERE (pool_repository_id IS NOT NULL); -CREATE INDEX index_geo_event_log_on_hashed_storage_attachments_event_id ON geo_event_log USING btree (hashed_storage_attachments_event_id) WHERE (hashed_storage_attachments_event_id IS NOT NULL); +CREATE UNIQUE INDEX index_projects_on_project_namespace_id ON projects USING btree (project_namespace_id); -CREATE INDEX index_geo_event_log_on_hashed_storage_migrated_event_id ON geo_event_log USING btree (hashed_storage_migrated_event_id) WHERE (hashed_storage_migrated_event_id IS NOT NULL); +CREATE INDEX index_projects_on_repository_storage ON projects USING btree (repository_storage); -CREATE INDEX index_geo_event_log_on_job_artifact_deleted_event_id ON geo_event_log USING btree (job_artifact_deleted_event_id) WHERE (job_artifact_deleted_event_id IS NOT NULL); +CREATE INDEX index_projects_on_runners_token ON projects USING btree (runners_token); -CREATE INDEX index_geo_event_log_on_lfs_object_deleted_event_id ON geo_event_log USING btree (lfs_object_deleted_event_id) WHERE (lfs_object_deleted_event_id IS NOT NULL); +CREATE INDEX index_projects_on_runners_token_encrypted ON projects USING btree (runners_token_encrypted); -CREATE INDEX index_geo_event_log_on_repositories_changed_event_id ON geo_event_log USING btree (repositories_changed_event_id) WHERE (repositories_changed_event_id IS NOT NULL); +CREATE INDEX index_projects_on_star_count ON projects USING btree (star_count); -CREATE INDEX index_geo_event_log_on_repository_created_event_id ON geo_event_log USING btree (repository_created_event_id) WHERE (repository_created_event_id IS NOT NULL); +CREATE INDEX index_projects_on_updated_at_and_id ON projects USING btree (updated_at, id); -CREATE INDEX index_geo_event_log_on_repository_deleted_event_id ON geo_event_log USING btree (repository_deleted_event_id) WHERE (repository_deleted_event_id IS NOT NULL); +CREATE INDEX index_projects_sync_events_on_project_id ON projects_sync_events USING btree (project_id); -CREATE INDEX index_geo_event_log_on_repository_renamed_event_id ON geo_event_log USING btree (repository_renamed_event_id) WHERE (repository_renamed_event_id IS NOT NULL); +CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events USING btree (prometheus_alert_id, payload_key); -CREATE INDEX index_geo_event_log_on_repository_updated_event_id ON geo_event_log USING btree (repository_updated_event_id) WHERE (repository_updated_event_id IS NOT NULL); +CREATE INDEX index_prometheus_alert_events_on_project_id_and_status ON prometheus_alert_events USING btree (project_id, status); -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 UNIQUE INDEX index_prometheus_alerts_metric_environment ON prometheus_alerts USING btree (project_id, prometheus_metric_id, environment_id); -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_prometheus_alerts_on_environment_id ON prometheus_alerts USING btree (environment_id); -CREATE INDEX index_geo_hashed_storage_attachments_events_on_project_id ON geo_hashed_storage_attachments_events USING btree (project_id); +CREATE INDEX index_prometheus_alerts_on_prometheus_metric_id ON prometheus_alerts USING btree (prometheus_metric_id); -CREATE INDEX index_geo_hashed_storage_migrated_events_on_project_id ON geo_hashed_storage_migrated_events USING btree (project_id); +CREATE INDEX index_prometheus_metrics_on_common ON prometheus_metrics USING btree (common); -CREATE INDEX index_geo_job_artifact_deleted_events_on_job_artifact_id ON geo_job_artifact_deleted_events USING btree (job_artifact_id); +CREATE INDEX index_prometheus_metrics_on_group ON prometheus_metrics USING btree ("group"); -CREATE INDEX index_geo_lfs_object_deleted_events_on_lfs_object_id ON geo_lfs_object_deleted_events USING btree (lfs_object_id); +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON prometheus_metrics USING btree (identifier) WHERE (project_id IS NULL); -CREATE INDEX index_geo_node_namespace_links_on_geo_node_id ON geo_node_namespace_links USING btree (geo_node_id); +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON prometheus_metrics USING btree (identifier, project_id); -CREATE UNIQUE INDEX index_geo_node_namespace_links_on_geo_node_id_and_namespace_id ON geo_node_namespace_links USING btree (geo_node_id, namespace_id); +CREATE INDEX index_prometheus_metrics_on_project_id ON prometheus_metrics USING btree (project_id); -CREATE INDEX index_geo_node_namespace_links_on_namespace_id ON geo_node_namespace_links USING btree (namespace_id); +CREATE INDEX index_protected_branch_merge_access ON protected_branch_merge_access_levels USING btree (protected_branch_id); -CREATE UNIQUE INDEX index_geo_node_statuses_on_geo_node_id ON geo_node_statuses USING btree (geo_node_id); +CREATE INDEX index_protected_branch_merge_access_levels_on_group_id ON protected_branch_merge_access_levels USING btree (group_id); -CREATE INDEX index_geo_nodes_on_access_key ON geo_nodes USING btree (access_key); +CREATE INDEX index_protected_branch_merge_access_levels_on_user_id ON protected_branch_merge_access_levels USING btree (user_id); -CREATE UNIQUE INDEX index_geo_nodes_on_name ON geo_nodes USING btree (name); +CREATE INDEX index_protected_branch_push_access ON protected_branch_push_access_levels USING btree (protected_branch_id); -CREATE INDEX index_geo_nodes_on_primary ON geo_nodes USING btree ("primary"); +CREATE INDEX index_protected_branch_push_access_levels_on_group_id ON protected_branch_push_access_levels USING btree (group_id); -CREATE INDEX index_geo_repositories_changed_events_on_geo_node_id ON geo_repositories_changed_events USING btree (geo_node_id); +CREATE INDEX index_protected_branch_push_access_levels_on_user_id ON protected_branch_push_access_levels USING btree (user_id); -CREATE INDEX index_geo_repository_created_events_on_project_id ON geo_repository_created_events USING btree (project_id); +CREATE INDEX index_protected_branch_unprotect_access ON protected_branch_unprotect_access_levels USING btree (protected_branch_id); -CREATE INDEX index_geo_repository_deleted_events_on_project_id ON geo_repository_deleted_events USING btree (project_id); +CREATE INDEX index_protected_branch_unprotect_access_levels_on_group_id ON protected_branch_unprotect_access_levels USING btree (group_id); -CREATE INDEX index_geo_repository_renamed_events_on_project_id ON geo_repository_renamed_events USING btree (project_id); +CREATE INDEX index_protected_branch_unprotect_access_levels_on_user_id ON protected_branch_unprotect_access_levels USING btree (user_id); -CREATE INDEX index_geo_repository_updated_events_on_project_id ON geo_repository_updated_events USING btree (project_id); +CREATE INDEX index_protected_branches_on_project_id ON protected_branches USING btree (project_id); -CREATE INDEX index_geo_repository_updated_events_on_source ON geo_repository_updated_events USING btree (source); +CREATE INDEX index_protected_environment_approval_rules_on_group_id ON protected_environment_approval_rules USING btree (group_id); -CREATE INDEX index_geo_reset_checksum_events_on_project_id ON geo_reset_checksum_events USING btree (project_id); +CREATE INDEX index_protected_environment_approval_rules_on_user_id ON protected_environment_approval_rules USING btree (user_id); -CREATE INDEX index_geo_upload_deleted_events_on_upload_id ON geo_upload_deleted_events USING btree (upload_id); +CREATE INDEX index_protected_environment_deploy_access ON protected_environment_deploy_access_levels USING btree (protected_environment_id); -CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gitlab_subscription_histories USING btree (gitlab_subscription_id); +CREATE INDEX index_protected_environment_deploy_access_levels_on_group_id ON protected_environment_deploy_access_levels USING btree (group_id); -CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_subscriptions USING btree (end_date, namespace_id); +CREATE INDEX index_protected_environment_deploy_access_levels_on_user_id ON protected_environment_deploy_access_levels USING btree (user_id); -CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id); +CREATE UNIQUE INDEX index_protected_environments_on_group_id_and_name ON protected_environments USING btree (group_id, name) WHERE (group_id IS NOT NULL); -CREATE UNIQUE INDEX index_gitlab_subscriptions_on_namespace_id ON gitlab_subscriptions USING btree (namespace_id); +CREATE INDEX index_protected_environments_on_project_id ON protected_environments USING btree (project_id); -CREATE UNIQUE INDEX index_gpg_key_subkeys_on_fingerprint ON gpg_key_subkeys USING btree (fingerprint); +CREATE UNIQUE INDEX index_protected_environments_on_project_id_and_name ON protected_environments USING btree (project_id, name); -CREATE INDEX index_gpg_key_subkeys_on_gpg_key_id ON gpg_key_subkeys USING btree (gpg_key_id); +CREATE INDEX index_protected_tag_create_access ON protected_tag_create_access_levels USING btree (protected_tag_id); -CREATE UNIQUE INDEX index_gpg_key_subkeys_on_keyid ON gpg_key_subkeys USING btree (keyid); +CREATE INDEX index_protected_tag_create_access_levels_on_group_id ON protected_tag_create_access_levels USING btree (group_id); -CREATE UNIQUE INDEX index_gpg_keys_on_fingerprint ON gpg_keys USING btree (fingerprint); +CREATE INDEX index_protected_tag_create_access_levels_on_user_id ON protected_tag_create_access_levels USING btree (user_id); -CREATE UNIQUE INDEX index_gpg_keys_on_primary_keyid ON gpg_keys USING btree (primary_keyid); +CREATE INDEX index_protected_tags_on_project_id ON protected_tags USING btree (project_id); -CREATE INDEX index_gpg_keys_on_user_id ON gpg_keys USING btree (user_id); +CREATE UNIQUE INDEX index_protected_tags_on_project_id_and_name ON protected_tags USING btree (project_id, name); -CREATE UNIQUE INDEX index_gpg_signatures_on_commit_sha ON gpg_signatures USING btree (commit_sha); +CREATE INDEX index_push_rules_on_is_sample ON push_rules USING btree (is_sample) WHERE is_sample; -CREATE INDEX index_gpg_signatures_on_gpg_key_id ON gpg_signatures USING btree (gpg_key_id); +CREATE INDEX index_push_rules_on_project_id ON push_rules USING btree (project_id); -CREATE INDEX index_gpg_signatures_on_gpg_key_primary_keyid ON gpg_signatures USING btree (gpg_key_primary_keyid); +CREATE UNIQUE INDEX index_raw_usage_data_on_recorded_at ON raw_usage_data USING btree (recorded_at); -CREATE INDEX index_gpg_signatures_on_gpg_key_subkey_id ON gpg_signatures USING btree (gpg_key_subkey_id); +CREATE UNIQUE INDEX index_redirect_routes_on_path ON redirect_routes USING btree (path); -CREATE INDEX index_gpg_signatures_on_project_id ON gpg_signatures USING btree (project_id); +CREATE UNIQUE INDEX index_redirect_routes_on_path_unique_text_pattern_ops ON redirect_routes USING btree (lower((path)::text) varchar_pattern_ops); -CREATE INDEX index_grafana_integrations_on_enabled ON grafana_integrations USING btree (enabled) WHERE (enabled IS TRUE); +CREATE INDEX index_redirect_routes_on_source_type_and_source_id ON redirect_routes USING btree (source_type, source_id); -CREATE INDEX index_grafana_integrations_on_project_id ON grafana_integrations USING btree (project_id); +CREATE INDEX index_related_epic_links_on_source_id ON related_epic_links USING btree (source_id); -CREATE UNIQUE INDEX index_group_custom_attributes_on_group_id_and_key ON group_custom_attributes USING btree (group_id, key); +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_group_custom_attributes_on_key_and_value ON group_custom_attributes USING btree (key, value); +CREATE INDEX index_related_epic_links_on_target_id ON related_epic_links USING btree (target_id); -CREATE INDEX index_group_deletion_schedules_on_marked_for_deletion_on ON group_deletion_schedules USING btree (marked_for_deletion_on); +CREATE UNIQUE INDEX index_release_links_on_release_id_and_name ON release_links USING btree (release_id, name); -CREATE INDEX index_group_deletion_schedules_on_user_id ON group_deletion_schedules USING btree (user_id); +CREATE UNIQUE INDEX index_release_links_on_release_id_and_url ON release_links USING btree (release_id, url); -CREATE UNIQUE INDEX index_group_deploy_keys_group_on_group_deploy_key_and_group_ids ON group_deploy_keys_groups USING btree (group_id, group_deploy_key_id); +CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree (author_id, id, created_at); -CREATE INDEX index_group_deploy_keys_groups_on_group_deploy_key_id ON group_deploy_keys_groups USING btree (group_deploy_key_id); +CREATE INDEX index_releases_on_project_id_and_released_at_and_id ON releases USING btree (project_id, released_at, id); -CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint ON group_deploy_keys USING btree (fingerprint); +CREATE UNIQUE INDEX index_releases_on_project_tag_unique ON releases USING btree (project_id, tag); -CREATE INDEX index_group_deploy_keys_on_fingerprint_sha256 ON group_deploy_keys USING btree (fingerprint_sha256); +CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at); -CREATE INDEX index_group_deploy_keys_on_user_id ON group_deploy_keys USING btree (user_id); +CREATE INDEX index_remote_mirrors_on_last_successful_update_at ON remote_mirrors USING btree (last_successful_update_at); -CREATE INDEX index_group_deploy_tokens_on_deploy_token_id ON group_deploy_tokens USING btree (deploy_token_id); +CREATE INDEX index_remote_mirrors_on_project_id ON remote_mirrors USING btree (project_id); -CREATE UNIQUE INDEX index_group_deploy_tokens_on_group_and_deploy_token_ids ON group_deploy_tokens USING btree (group_id, deploy_token_id); +CREATE INDEX index_required_code_owners_sections_on_protected_branch_id ON required_code_owners_sections USING btree (protected_branch_id); -CREATE UNIQUE INDEX index_group_group_links_on_shared_group_and_shared_with_group ON group_group_links USING btree (shared_group_id, shared_with_group_id); +CREATE INDEX index_requirements_management_test_reports_on_author_id ON requirements_management_test_reports USING btree (author_id); -CREATE INDEX index_group_group_links_on_shared_with_group_id ON group_group_links USING btree (shared_with_group_id); +CREATE INDEX index_requirements_management_test_reports_on_build_id ON requirements_management_test_reports USING btree (build_id); -CREATE INDEX index_group_import_states_on_group_id ON group_import_states USING btree (group_id); +CREATE INDEX index_requirements_management_test_reports_on_issue_id ON requirements_management_test_reports USING btree (issue_id); -CREATE INDEX index_group_import_states_on_user_id ON group_import_states USING btree (user_id) WHERE (user_id IS NOT NULL); +CREATE INDEX index_requirements_management_test_reports_on_requirement_id ON requirements_management_test_reports USING btree (requirement_id); -CREATE INDEX index_group_repository_storage_moves_on_group_id ON group_repository_storage_moves USING btree (group_id); +CREATE INDEX index_requirements_on_author_id ON requirements USING btree (author_id); -CREATE UNIQUE INDEX index_group_stages_on_group_id_group_value_stream_id_and_name ON analytics_cycle_analytics_group_stages USING btree (group_id, group_value_stream_id, name); +CREATE INDEX index_requirements_on_created_at ON requirements USING btree (created_at); -CREATE INDEX index_group_stages_on_stage_event_hash_id ON analytics_cycle_analytics_group_stages USING btree (stage_event_hash_id); +CREATE UNIQUE INDEX index_requirements_on_issue_id ON requirements USING btree (issue_id); -CREATE UNIQUE INDEX index_group_user_callouts_feature ON user_group_callouts USING btree (user_id, feature_name, group_id); +CREATE INDEX index_requirements_on_project_id ON requirements USING btree (project_id); -CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_repositories USING btree (disk_path); +CREATE UNIQUE INDEX index_requirements_on_project_id_and_iid ON requirements USING btree (project_id, iid) WHERE (project_id IS NOT NULL); -CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id); +CREATE INDEX index_requirements_on_state ON requirements USING btree (state); -CREATE INDEX index_historical_data_on_recorded_at ON historical_data USING btree (recorded_at); +CREATE INDEX index_requirements_on_title_trigram ON requirements USING gin (title gin_trgm_ops); -CREATE UNIQUE INDEX index_http_integrations_on_active_and_project_and_endpoint ON alert_management_http_integrations USING btree (active, project_id, endpoint_identifier) WHERE active; +CREATE INDEX index_requirements_on_updated_at ON requirements USING btree (updated_at); -CREATE INDEX index_identities_on_saml_provider_id ON identities USING btree (saml_provider_id) WHERE (saml_provider_id IS NOT NULL); +CREATE INDEX index_resource_iteration_events_on_issue_id ON resource_iteration_events USING btree (issue_id); -CREATE INDEX index_identities_on_user_id ON identities USING btree (user_id); +CREATE INDEX index_resource_iteration_events_on_iteration_id ON resource_iteration_events USING btree (iteration_id); -CREATE INDEX index_im_issuable_escalation_statuses_on_policy_id ON incident_management_issuable_escalation_statuses USING btree (policy_id); +CREATE INDEX index_resource_iteration_events_on_iteration_id_and_add_action ON resource_iteration_events USING btree (iteration_id) WHERE (action = 1); -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_resource_iteration_events_on_merge_request_id ON resource_iteration_events USING btree (merge_request_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_resource_iteration_events_on_user_id ON resource_iteration_events USING btree (user_id); -CREATE INDEX index_import_export_uploads_on_project_id ON import_export_uploads USING btree (project_id); +CREATE INDEX index_resource_label_events_issue_id_label_id_action ON resource_label_events USING btree (issue_id, label_id, action); -CREATE INDEX index_import_export_uploads_on_updated_at ON import_export_uploads USING btree (updated_at); +CREATE INDEX index_resource_label_events_on_epic_id ON resource_label_events USING btree (epic_id); -CREATE INDEX index_import_failures_on_correlation_id_value ON import_failures USING btree (correlation_id_value); +CREATE INDEX index_resource_label_events_on_label_id_and_action ON resource_label_events USING btree (label_id, action); -CREATE INDEX index_import_failures_on_group_id_not_null ON import_failures USING btree (group_id) WHERE (group_id IS NOT NULL); +CREATE INDEX index_resource_label_events_on_merge_request_id_label_id_action ON resource_label_events USING btree (merge_request_id, label_id, action); -CREATE INDEX index_import_failures_on_project_id_and_correlation_id_value ON import_failures USING btree (project_id, correlation_id_value) WHERE (retry_count = 0); +CREATE INDEX index_resource_label_events_on_user_id ON resource_label_events USING btree (user_id); -CREATE INDEX index_import_failures_on_project_id_not_null ON import_failures USING btree (project_id) WHERE (project_id IS NOT NULL); +CREATE INDEX index_resource_milestone_events_created_at ON resource_milestone_events USING btree (created_at); -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_resource_milestone_events_on_issue_id ON resource_milestone_events USING btree (issue_id); -CREATE INDEX index_in_product_marketing_emails_on_user_id ON in_product_marketing_emails USING btree (user_id); +CREATE INDEX index_resource_milestone_events_on_merge_request_id ON resource_milestone_events USING btree (merge_request_id); -CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_track_series ON in_product_marketing_emails USING btree (user_id, track, series); +CREATE INDEX index_resource_milestone_events_on_milestone_id ON resource_milestone_events USING btree (milestone_id); -CREATE INDEX index_inc_mgmnt_oncall_participants_on_oncall_user_id ON incident_management_oncall_participants USING btree (user_id); +CREATE INDEX index_resource_milestone_events_on_milestone_id_and_add_action ON resource_milestone_events USING btree (milestone_id) WHERE (action = 1); -CREATE UNIQUE INDEX index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id ON incident_management_oncall_participants USING btree (user_id, oncall_rotation_id); +CREATE INDEX index_resource_milestone_events_on_user_id ON resource_milestone_events USING btree (user_id); -CREATE INDEX index_inc_mgmnt_oncall_pcpnt_on_oncall_rotation_id_is_removed ON incident_management_oncall_participants USING btree (oncall_rotation_id, is_removed); +CREATE INDEX index_resource_state_events_on_epic_id ON resource_state_events USING btree (epic_id); -CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id ON incident_management_oncall_rotations USING btree (oncall_schedule_id, id); +CREATE INDEX index_resource_state_events_on_issue_id_and_created_at ON resource_state_events USING btree (issue_id, created_at); -CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name ON incident_management_oncall_rotations USING btree (oncall_schedule_id, name); +CREATE INDEX index_resource_state_events_on_merge_request_id ON resource_state_events USING btree (merge_request_id); -CREATE INDEX index_incident_management_oncall_schedules_on_project_id ON incident_management_oncall_schedules USING btree (project_id); +CREATE INDEX index_resource_state_events_on_source_merge_request_id ON resource_state_events USING btree (source_merge_request_id); -CREATE INDEX index_incident_management_oncall_shifts_on_participant_id ON incident_management_oncall_shifts USING btree (participant_id); +CREATE INDEX index_resource_state_events_on_user_id ON resource_state_events USING btree (user_id); -CREATE UNIQUE INDEX index_index_statuses_on_project_id ON index_statuses USING btree (project_id); +CREATE INDEX index_resource_weight_events_on_issue_id_and_created_at ON resource_weight_events USING btree (issue_id, created_at); -CREATE INDEX index_insights_on_namespace_id ON insights USING btree (namespace_id); +CREATE INDEX index_resource_weight_events_on_issue_id_and_weight ON resource_weight_events USING btree (issue_id, weight); -CREATE INDEX index_insights_on_project_id ON insights USING btree (project_id); +CREATE INDEX index_resource_weight_events_on_user_id ON resource_weight_events USING btree (user_id); -CREATE INDEX index_integrations_on_inherit_from_id ON integrations USING btree (inherit_from_id); +CREATE INDEX index_reviews_on_author_id ON reviews USING btree (author_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_reviews_on_merge_request_id ON reviews USING btree (merge_request_id); -CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_unique ON integrations USING btree (project_id, type); +CREATE INDEX index_reviews_on_project_id ON reviews USING btree (project_id); -CREATE INDEX index_integrations_on_template ON integrations USING btree (template); +CREATE INDEX index_route_on_name_trigram ON routes USING gin (name gin_trgm_ops); -CREATE INDEX index_integrations_on_type ON integrations USING btree (type); +CREATE UNIQUE INDEX index_routes_on_namespace_id ON routes USING btree (namespace_id); -CREATE UNIQUE INDEX index_integrations_on_type_and_instance_partial ON integrations USING btree (type, instance) WHERE (instance = true); +CREATE UNIQUE INDEX index_routes_on_path ON routes USING btree (path); -CREATE UNIQUE INDEX index_integrations_on_type_and_template_partial ON integrations USING btree (type, template) WHERE (template = true); +CREATE INDEX index_routes_on_path_text_pattern_ops ON routes USING btree (path varchar_pattern_ops); -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_routes_on_path_trigram ON routes USING gin (path gin_trgm_ops); -CREATE UNIQUE INDEX index_integrations_on_unique_group_id_and_type ON integrations USING btree (group_id, type); +CREATE UNIQUE INDEX index_routes_on_source_type_and_source_id ON routes USING btree (source_type, source_id); -CREATE INDEX index_internal_ids_on_namespace_id ON internal_ids USING btree (namespace_id); +CREATE UNIQUE INDEX index_saml_group_links_on_group_id_and_saml_group_name ON saml_group_links USING btree (group_id, saml_group_name); -CREATE INDEX index_internal_ids_on_project_id ON internal_ids USING btree (project_id); +CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (group_id); -CREATE UNIQUE INDEX index_internal_ids_on_usage_and_namespace_id ON internal_ids USING btree (usage, namespace_id) WHERE (namespace_id IS NOT NULL); +CREATE UNIQUE INDEX index_saved_replies_on_name_text_pattern_ops ON saved_replies USING btree (user_id, name text_pattern_ops); -CREATE UNIQUE INDEX index_internal_ids_on_usage_and_project_id ON internal_ids USING btree (usage, project_id) WHERE (project_id IS NOT NULL); +CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id); -CREATE INDEX index_ip_restrictions_on_group_id ON ip_restrictions 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); -CREATE INDEX index_issuable_metric_images_on_issue_id ON issuable_metric_images USING btree (issue_id); +CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identities USING btree (user_id, group_id); -CREATE UNIQUE INDEX index_issuable_severities_on_issue_id ON issuable_severities USING btree (issue_id); +CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypted ON scim_oauth_access_tokens USING btree (group_id, token_encrypted); -CREATE INDEX index_issuable_slas_on_due_at_id_label_applied_issuable_closed ON issuable_slas USING btree (due_at, id) WHERE ((label_applied = false) AND (issuable_closed = false)); +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 UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree (issue_id); +CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); -CREATE INDEX index_issue_assignees_on_user_id ON issue_assignees USING btree (user_id); +CREATE INDEX index_security_findings_on_confidence ON security_findings USING btree (confidence); -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_security_findings_on_project_fingerprint ON security_findings USING btree (project_fingerprint); -CREATE INDEX index_issue_links_on_source_id ON issue_links USING btree (source_id); +CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated); -CREATE UNIQUE INDEX index_issue_links_on_source_id_and_target_id ON issue_links USING btree (source_id, target_id); +CREATE INDEX index_security_findings_on_scan_id_and_id ON security_findings USING btree (scan_id, id); -CREATE INDEX index_issue_links_on_target_id ON issue_links USING btree (target_id); +CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id); -CREATE INDEX index_issue_metrics_on_issue_id_and_timestamps ON issue_metrics USING btree (issue_id, first_mentioned_in_commit_at, first_associated_with_milestone_at, first_added_to_board_at); +CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity); -CREATE INDEX index_issue_on_project_id_state_id_and_blocking_issues_count ON issues USING btree (project_id, state_id, blocking_issues_count); +CREATE UNIQUE INDEX index_security_findings_on_uuid_and_scan_id ON security_findings USING btree (uuid, scan_id); -CREATE INDEX index_issue_tracker_data_on_service_id ON issue_tracker_data USING btree (service_id); +CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at); -CREATE UNIQUE INDEX index_issue_user_mentions_on_note_id ON issue_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id); -CREATE INDEX index_issues_on_author_id ON issues USING btree (author_id); +CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (pipeline_id); -CREATE INDEX index_issues_on_author_id_and_id_and_created_at ON issues USING btree (author_id, id, created_at); +CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id); -CREATE INDEX index_issues_on_closed_by_id ON issues USING btree (closed_by_id); +CREATE UNIQUE INDEX index_security_training_providers_on_unique_name ON security_training_providers USING btree (name); -CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential); +CREATE INDEX index_security_trainings_on_project_id ON security_trainings USING btree (project_id); -CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops); +CREATE INDEX index_security_trainings_on_provider_id ON security_trainings USING btree (provider_id); -CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL); +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_issues_on_incident_issue_type ON issues USING btree (issue_type) WHERE (issue_type = 1); +CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id); -CREATE INDEX index_issues_on_last_edited_by_id ON issues USING btree (last_edited_by_id); +CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text); -CREATE INDEX index_issues_on_lock_version ON issues USING btree (lock_version) WHERE (lock_version IS NULL); +CREATE UNIQUE INDEX index_sent_notifications_on_reply_key ON sent_notifications USING btree (reply_key); -CREATE INDEX index_issues_on_milestone_id ON issues USING btree (milestone_id); +CREATE UNIQUE INDEX index_sentry_issues_on_issue_id ON sentry_issues USING btree (issue_id); -CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL); +CREATE INDEX index_sentry_issues_on_sentry_issue_identifier ON sentry_issues USING btree (sentry_issue_identifier); -CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at); +CREATE INDEX index_serverless_domain_cluster_on_creator_id ON serverless_domain_cluster USING btree (creator_id); -CREATE INDEX index_issues_on_project_id_and_created_at_issue_type_incident ON issues USING btree (project_id, created_at) WHERE (issue_type = 1); +CREATE INDEX index_serverless_domain_cluster_on_pages_domain_id ON serverless_domain_cluster USING btree (pages_domain_id); -CREATE UNIQUE INDEX index_issues_on_project_id_and_external_key ON issues USING btree (project_id, external_key) WHERE (external_key IS NOT NULL); +CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true); -CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid); +CREATE INDEX index_service_desk_settings_on_file_template_project_id ON service_desk_settings USING btree (file_template_project_id); -CREATE INDEX index_issues_on_project_id_and_state_id_and_created_at_and_id ON issues USING btree (project_id, state_id, created_at, id); +CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name); -CREATE INDEX index_issues_on_project_id_and_upvotes_count ON issues USING btree (project_id, upvotes_count); +CREATE UNIQUE INDEX index_site_profile_secret_variables_on_site_profile_id_and_key ON dast_site_profile_secret_variables USING btree (dast_site_profile_id, key); -CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL); +CREATE INDEX index_slack_integrations_on_service_id ON slack_integrations USING btree (service_id); -CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); +CREATE UNIQUE INDEX index_slack_integrations_on_team_id_and_alias ON slack_integrations USING btree (team_id, alias); -CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops); +CREATE UNIQUE INDEX index_smartcard_identities_on_subject_and_issuer ON smartcard_identities USING btree (subject, issuer); -CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at); +CREATE INDEX index_smartcard_identities_on_user_id ON smartcard_identities USING btree (user_id); -CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); +CREATE INDEX index_snippet_on_id_and_project_id ON snippets USING btree (id, project_id); -CREATE INDEX index_issues_on_work_item_type_id ON issues USING btree (work_item_type_id); +CREATE INDEX index_snippet_repositories_failed_verification ON snippet_repositories USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING btree (group_id); +CREATE INDEX index_snippet_repositories_needs_verification ON snippet_repositories USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key); +CREATE UNIQUE INDEX index_snippet_repositories_on_disk_path ON snippet_repositories USING btree (disk_path); -CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id); +CREATE INDEX index_snippet_repositories_on_shard_id ON snippet_repositories USING btree (shard_id); -CREATE INDEX index_jira_imports_on_label_id ON jira_imports USING btree (label_id); +CREATE INDEX index_snippet_repositories_pending_verification ON snippet_repositories USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -CREATE INDEX index_jira_imports_on_project_id_and_jira_project_key ON jira_imports USING btree (project_id, jira_project_key); +CREATE INDEX index_snippet_repositories_verification_state ON snippet_repositories USING btree (verification_state); -CREATE INDEX index_jira_imports_on_user_id ON jira_imports USING btree (user_id); +CREATE INDEX index_snippet_repository_storage_moves_on_snippet_id ON snippet_repository_storage_moves USING btree (snippet_id); -CREATE INDEX index_jira_tracker_data_on_service_id ON jira_tracker_data USING btree (service_id); +CREATE UNIQUE INDEX index_snippet_user_mentions_on_note_id ON snippet_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); -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_snippets_on_author_id ON snippets USING btree (author_id); -CREATE INDEX index_keys_on_expires_at_and_id ON keys USING btree (date(timezone('UTC'::text, expires_at)), id) WHERE (expiry_notification_delivered_at IS NULL); +CREATE INDEX index_snippets_on_content_trigram ON snippets USING gin (content gin_trgm_ops); -CREATE UNIQUE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint); +CREATE INDEX index_snippets_on_created_at ON snippets USING btree (created_at); -CREATE INDEX index_keys_on_fingerprint_sha256 ON keys USING btree (fingerprint_sha256); +CREATE INDEX index_snippets_on_description_trigram ON snippets USING gin (description gin_trgm_ops); -CREATE INDEX index_keys_on_id_and_ldap_key_type ON keys USING btree (id) WHERE ((type)::text = 'LDAPKey'::text); +CREATE INDEX index_snippets_on_file_name_trigram ON snippets USING gin (file_name gin_trgm_ops); -CREATE INDEX index_keys_on_last_used_at ON keys USING btree (last_used_at DESC NULLS LAST); +CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, created_at); -CREATE INDEX index_keys_on_user_id ON keys USING btree (user_id); +CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type); -CREATE UNIQUE INDEX index_kubernetes_namespaces_on_cluster_project_environment_id ON clusters_kubernetes_namespaces USING btree (cluster_id, project_id, environment_id); +CREATE INDEX index_snippets_on_project_id_and_title ON snippets USING btree (project_id, title); -CREATE INDEX index_label_links_on_label_id_and_target_type ON label_links USING btree (label_id, target_type); +CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level); -CREATE INDEX index_label_links_on_target_id_and_target_type ON label_links USING btree (target_id, target_type); +CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops); -CREATE INDEX index_label_priorities_on_label_id ON label_priorities USING btree (label_id); +CREATE INDEX index_snippets_on_updated_at ON snippets USING btree (updated_at); -CREATE INDEX index_label_priorities_on_priority ON label_priorities USING btree (priority); +CREATE INDEX index_snippets_on_visibility_level_and_secret ON snippets USING btree (visibility_level, secret); -CREATE UNIQUE INDEX index_label_priorities_on_project_id_and_label_id ON label_priorities USING btree (project_id, label_id); +CREATE INDEX index_software_license_policies_on_software_license_id ON software_license_policies USING btree (software_license_id); -CREATE UNIQUE INDEX index_labels_on_group_id_and_project_id_and_title ON labels USING btree (group_id, project_id, title); +CREATE UNIQUE INDEX index_software_license_policies_unique_per_project ON software_license_policies USING btree (project_id, software_license_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 INDEX index_software_licenses_on_spdx_identifier ON software_licenses USING btree (spdx_identifier); -CREATE INDEX index_labels_on_project_id ON labels USING btree (project_id); +CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses USING btree (name); -CREATE UNIQUE INDEX index_labels_on_project_id_and_title_unique ON labels USING btree (project_id, title) WHERE (group_id IS NULL); +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_labels_on_template ON labels USING btree (template) WHERE template; +CREATE INDEX index_sop_schedules_on_sop_configuration_id ON security_orchestration_policy_rule_schedules USING btree (security_orchestration_policy_configuration_id); -CREATE INDEX index_labels_on_title ON labels USING btree (title); +CREATE INDEX index_sop_schedules_on_user_id ON security_orchestration_policy_rule_schedules USING btree (user_id); -CREATE INDEX index_labels_on_type_and_project_id ON labels USING btree (type, project_id); +CREATE INDEX index_spam_logs_on_user_id ON spam_logs USING btree (user_id); -CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON lfs_file_locks USING btree (project_id, path); +CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id); -CREATE INDEX index_lfs_file_locks_on_user_id ON lfs_file_locks USING btree (user_id); +CREATE INDEX index_sprints_on_description_trigram ON sprints USING gin (description gin_trgm_ops); -CREATE INDEX index_lfs_objects_on_file_store ON lfs_objects USING btree (file_store); +CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date); -CREATE UNIQUE INDEX index_lfs_objects_on_oid ON lfs_objects USING btree (oid); +CREATE INDEX index_sprints_on_group_id ON sprints USING btree (group_id); -CREATE INDEX index_lfs_objects_projects_on_lfs_object_id ON lfs_objects_projects USING btree (lfs_object_id); +CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid); -CREATE INDEX index_lfs_objects_projects_on_project_id_and_lfs_object_id ON lfs_objects_projects USING btree (project_id, lfs_object_id); +CREATE INDEX index_sprints_on_title ON sprints USING btree (title); -CREATE INDEX index_list_user_preferences_on_list_id ON list_user_preferences USING btree (list_id); +CREATE INDEX index_sprints_on_title_trigram ON sprints USING gin (title gin_trgm_ops); -CREATE INDEX index_list_user_preferences_on_user_id ON list_user_preferences USING btree (user_id); +CREATE INDEX index_status_check_responses_on_external_approval_rule_id ON status_check_responses USING btree (external_approval_rule_id); -CREATE UNIQUE INDEX index_list_user_preferences_on_user_id_and_list_id ON list_user_preferences USING btree (user_id, list_id); +CREATE INDEX index_status_check_responses_on_external_status_check_id ON status_check_responses USING btree (external_status_check_id); -CREATE UNIQUE INDEX index_lists_on_board_id_and_label_id ON lists USING btree (board_id, label_id); +CREATE INDEX index_status_check_responses_on_merge_request_id ON status_check_responses USING btree (merge_request_id); -CREATE INDEX index_lists_on_iteration_id ON lists USING btree (iteration_id); +CREATE UNIQUE INDEX index_status_page_published_incidents_on_issue_id ON status_page_published_incidents USING btree (issue_id); -CREATE INDEX index_lists_on_label_id ON lists USING btree (label_id); +CREATE INDEX index_status_page_settings_on_project_id ON status_page_settings USING btree (project_id); -CREATE INDEX index_lists_on_list_type ON lists USING btree (list_type); +CREATE INDEX index_subscriptions_on_project_id ON subscriptions USING btree (project_id); -CREATE INDEX index_lists_on_milestone_id ON lists USING btree (milestone_id); +CREATE UNIQUE INDEX index_subscriptions_on_subscribable_and_user_id_and_project_id ON subscriptions USING btree (subscribable_id, subscribable_type, user_id, project_id); -CREATE INDEX index_lists_on_user_id ON lists USING btree (user_id); +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_members_on_access_level ON members USING btree (access_level); +CREATE UNIQUE INDEX index_suggestions_on_note_id_and_relative_order ON suggestions USING btree (note_id, relative_order); -CREATE INDEX index_members_on_expires_at ON members USING btree (expires_at); +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); -CREATE INDEX index_members_on_invite_email ON members USING btree (invite_email); +CREATE UNIQUE INDEX index_system_note_metadata_on_note_id ON system_note_metadata USING btree (note_id); -CREATE UNIQUE INDEX index_members_on_invite_token ON members USING btree (invite_token); +CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id); -CREATE INDEX index_members_on_requested_at ON members USING btree (requested_at); +CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON taggings USING btree (taggable_id, taggable_type, context); -CREATE INDEX index_members_on_source_id_and_source_type ON members USING btree (source_id, source_type); +CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name); -CREATE INDEX index_members_on_user_id_and_access_level_requested_at_is_null ON members USING btree (user_id, access_level) WHERE (requested_at IS NULL); +CREATE INDEX index_tags_on_name_trigram ON tags USING gin (name gin_trgm_ops); -CREATE INDEX index_members_on_user_id_created_at ON members USING btree (user_id, created_at) WHERE ((ldap = true) AND ((type)::text = 'GroupMember'::text) AND ((source_type)::text = 'Namespace'::text)); +CREATE INDEX index_term_agreements_on_term_id ON term_agreements USING btree (term_id); -CREATE INDEX index_members_on_user_id_source_id_source_type ON members USING btree (user_id, source_id, source_type); +CREATE INDEX index_term_agreements_on_user_id ON term_agreements USING btree (user_id); -CREATE INDEX index_merge_request_assignees_on_merge_request_id ON merge_request_assignees USING btree (merge_request_id); +CREATE INDEX index_terraform_state_versions_failed_verification ON terraform_state_versions USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -CREATE UNIQUE INDEX index_merge_request_assignees_on_merge_request_id_and_user_id ON merge_request_assignees USING btree (merge_request_id, user_id); +CREATE INDEX index_terraform_state_versions_needs_verification ON terraform_state_versions USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -CREATE INDEX index_merge_request_assignees_on_user_id ON merge_request_assignees USING btree (user_id); +CREATE INDEX index_terraform_state_versions_on_ci_build_id ON terraform_state_versions USING btree (ci_build_id); -CREATE INDEX index_merge_request_blocks_on_blocked_merge_request_id ON merge_request_blocks USING btree (blocked_merge_request_id); +CREATE INDEX index_terraform_state_versions_on_created_by_user_id ON terraform_state_versions USING btree (created_by_user_id); -CREATE UNIQUE INDEX index_merge_request_cleanup_schedules_on_merge_request_id ON merge_request_cleanup_schedules USING btree (merge_request_id); +CREATE UNIQUE INDEX index_terraform_state_versions_on_state_id_and_version ON terraform_state_versions USING btree (terraform_state_id, version); -CREATE INDEX index_merge_request_cleanup_schedules_on_status ON merge_request_cleanup_schedules USING btree (status); +CREATE INDEX index_terraform_state_versions_on_verification_state ON terraform_state_versions USING btree (verification_state); -CREATE INDEX index_merge_request_context_commits_on_merge_request_id ON merge_request_context_commits USING btree (merge_request_id); +CREATE INDEX index_terraform_state_versions_pending_verification ON terraform_state_versions USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -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_terraform_states_on_file_store ON terraform_states USING btree (file_store); -CREATE INDEX index_merge_request_diff_commits_on_sha ON merge_request_diff_commits USING btree (sha); +CREATE INDEX index_terraform_states_on_locked_by_user_id ON terraform_states USING btree (locked_by_user_id); -CREATE INDEX index_merge_request_diff_details_failed_verification ON merge_request_diff_details USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); +CREATE UNIQUE INDEX index_terraform_states_on_project_id_and_name ON terraform_states USING btree (project_id, name); -CREATE INDEX index_merge_request_diff_details_needs_verification ON merge_request_diff_details USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); +CREATE UNIQUE INDEX index_terraform_states_on_uuid ON terraform_states USING btree (uuid); -CREATE INDEX index_merge_request_diff_details_on_merge_request_diff_id ON merge_request_diff_details USING btree (merge_request_diff_id); +CREATE INDEX index_timelogs_on_issue_id ON timelogs USING btree (issue_id); -CREATE INDEX index_merge_request_diff_details_on_verification_state ON merge_request_diff_details USING btree (verification_state); +CREATE INDEX index_timelogs_on_merge_request_id ON timelogs USING btree (merge_request_id); -CREATE INDEX index_merge_request_diff_details_pending_verification ON merge_request_diff_details USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); +CREATE INDEX index_timelogs_on_note_id ON timelogs USING btree (note_id); -CREATE INDEX index_merge_request_diffs_by_id_partial ON merge_request_diffs USING btree (id) WHERE ((files_count > 0) AND ((NOT stored_externally) OR (stored_externally IS NULL))); +CREATE INDEX index_timelogs_on_project_id_and_spent_at ON timelogs USING btree (project_id, spent_at); -CREATE INDEX index_merge_request_diffs_on_external_diff_store ON merge_request_diffs USING btree (external_diff_store); +CREATE INDEX index_timelogs_on_spent_at ON timelogs USING btree (spent_at) WHERE (spent_at IS NOT NULL); -CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON merge_request_diffs USING btree (merge_request_id, id); +CREATE INDEX index_timelogs_on_user_id ON timelogs USING btree (user_id); -CREATE UNIQUE INDEX index_merge_request_diffs_on_unique_merge_request_id ON merge_request_diffs USING btree (merge_request_id) WHERE (diff_type = 2); +CREATE INDEX index_todos_on_author_id ON todos USING btree (author_id); -CREATE INDEX index_merge_request_metrics_on_first_deployed_to_production_at ON merge_request_metrics USING btree (first_deployed_to_production_at); +CREATE INDEX index_todos_on_author_id_and_created_at ON todos USING btree (author_id, created_at); -CREATE INDEX index_merge_request_metrics_on_latest_closed_at ON merge_request_metrics USING btree (latest_closed_at) WHERE (latest_closed_at IS NOT NULL); +CREATE INDEX index_todos_on_commit_id ON todos USING btree (commit_id); -CREATE INDEX index_merge_request_metrics_on_latest_closed_by_id ON merge_request_metrics USING btree (latest_closed_by_id); +CREATE INDEX index_todos_on_group_id ON todos USING btree (group_id); -CREATE INDEX index_merge_request_metrics_on_merge_request_id_and_merged_at ON merge_request_metrics USING btree (merge_request_id, merged_at) WHERE (merged_at IS NOT NULL); +CREATE INDEX index_todos_on_note_id ON todos USING btree (note_id); -CREATE INDEX index_merge_request_metrics_on_merged_at ON merge_request_metrics USING btree (merged_at); +CREATE INDEX index_todos_on_project_id_and_id ON todos USING btree (project_id, id); -CREATE INDEX index_merge_request_metrics_on_merged_by_id ON merge_request_metrics USING btree (merged_by_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_merge_request_metrics_on_pipeline_id ON merge_request_metrics USING btree (pipeline_id); +CREATE INDEX index_todos_on_target_type_and_target_id ON todos USING btree (target_type, target_id); -CREATE INDEX index_merge_request_metrics_on_target_project_id ON merge_request_metrics USING btree (target_project_id); +CREATE INDEX index_todos_on_user_id ON todos USING btree (user_id); -CREATE UNIQUE INDEX index_merge_request_reviewers_on_merge_request_id_and_user_id ON merge_request_reviewers USING btree (merge_request_id, user_id); +CREATE INDEX index_todos_on_user_id_and_id_done ON todos USING btree (user_id, id) WHERE ((state)::text = 'done'::text); -CREATE INDEX index_merge_request_reviewers_on_user_id ON merge_request_reviewers USING btree (user_id); +CREATE INDEX index_todos_on_user_id_and_id_pending ON todos USING btree (user_id, id) WHERE ((state)::text = 'pending'::text); -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 UNIQUE INDEX index_token_with_ivs_on_hashed_plaintext_token ON token_with_ivs USING btree (hashed_plaintext_token); -CREATE INDEX index_merge_requests_closing_issues_on_issue_id ON merge_requests_closing_issues USING btree (issue_id); +CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_token ON token_with_ivs USING btree (hashed_token); -CREATE INDEX index_merge_requests_closing_issues_on_merge_request_id ON merge_requests_closing_issues USING btree (merge_request_id); +CREATE INDEX index_topics_non_private_projects_count ON topics USING btree (non_private_projects_count DESC, id); -CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree (assignee_id); +CREATE INDEX index_topics_on_lower_name ON topics USING btree (lower(name)); -CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id); +CREATE UNIQUE INDEX index_topics_on_name ON topics USING btree (name); -CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at); +CREATE INDEX index_topics_on_name_trigram ON topics USING gin (name gin_trgm_ops); -CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops); +CREATE INDEX index_topics_total_projects_count ON topics USING btree (total_projects_count DESC, id); -CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id); +CREATE UNIQUE INDEX index_trending_projects_on_project_id ON trending_projects USING btree (project_id); -CREATE INDEX index_merge_requests_on_latest_merge_request_diff_id ON merge_requests USING btree (latest_merge_request_diff_id); +CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING btree (key_handle); -CREATE INDEX index_merge_requests_on_lock_version ON merge_requests USING btree (lock_version) WHERE (lock_version IS NULL); +CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree (user_id); -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 UNIQUE INDEX index_uniq_im_issuable_escalation_statuses_on_issue_id ON incident_management_issuable_escalation_statuses USING btree (issue_id); -CREATE INDEX index_merge_requests_on_milestone_id ON merge_requests USING btree (milestone_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 INDEX index_merge_requests_on_source_branch ON merge_requests USING btree (source_branch); +CREATE UNIQUE INDEX index_unique_issue_metrics_issue_id ON issue_metrics USING btree (issue_id); -CREATE INDEX index_merge_requests_on_source_project_id_and_source_branch ON merge_requests USING btree (source_project_id, source_branch); +CREATE UNIQUE INDEX index_unique_project_authorizations_on_project_id_user_id ON project_authorizations USING btree (project_id, user_id); -CREATE INDEX index_merge_requests_on_sprint_id ON merge_requests USING btree (sprint_id); +CREATE INDEX index_unit_test_failures_failed_at ON ci_unit_test_failures USING btree (failed_at DESC); -CREATE INDEX index_merge_requests_on_target_branch ON merge_requests USING btree (target_branch); +CREATE UNIQUE INDEX index_unit_test_failures_unique_columns ON ci_unit_test_failures USING btree (unit_test_id, failed_at DESC, build_id); -CREATE INDEX index_merge_requests_on_target_project_id_and_created_at_and_id ON merge_requests USING btree (target_project_id, created_at, id); +CREATE UNIQUE INDEX index_upcoming_reconciliations_on_namespace_id ON upcoming_reconciliations USING btree (namespace_id); -CREATE UNIQUE INDEX index_merge_requests_on_target_project_id_and_iid ON merge_requests USING btree (target_project_id, iid); +CREATE INDEX index_upload_states_failed_verification ON upload_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -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_upload_states_needs_verification ON upload_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -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_upload_states_on_upload_id ON upload_states USING btree (upload_id); -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_upload_states_on_verification_state ON upload_states USING btree (verification_state); -CREATE INDEX index_merge_requests_on_target_project_id_and_squash_commit_sha ON merge_requests USING btree (target_project_id, squash_commit_sha); +CREATE INDEX index_upload_states_pending_verification ON upload_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -CREATE INDEX index_merge_requests_on_target_project_id_and_target_branch ON merge_requests USING btree (target_project_id, target_branch) WHERE ((state_id = 1) AND (merge_when_pipeline_succeeds = true)); +CREATE INDEX index_uploads_on_checksum ON uploads USING btree (checksum); -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_uploads_on_model_id_and_model_type ON uploads USING btree (model_id, model_type); -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_uploads_on_store ON uploads USING btree (store); -CREATE INDEX index_merge_requests_on_title ON merge_requests USING btree (title); +CREATE INDEX index_uploads_on_uploader_and_path ON uploads USING btree (uploader, path); -CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops); +CREATE INDEX index_user_agent_details_on_subject_id_and_subject_type ON user_agent_details USING btree (subject_id, subject_type); -CREATE INDEX index_merge_requests_on_tp_id_and_merge_commit_sha_and_id ON merge_requests USING btree (target_project_id, merge_commit_sha, id); +CREATE INDEX index_user_callouts_on_user_id ON user_callouts USING btree (user_id); -CREATE INDEX index_merge_requests_on_updated_by_id ON merge_requests USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); +CREATE UNIQUE INDEX index_user_callouts_on_user_id_and_feature_name ON user_callouts USING btree (user_id, feature_name); -CREATE UNIQUE INDEX index_merge_trains_on_merge_request_id ON merge_trains USING btree (merge_request_id); +CREATE INDEX index_user_canonical_emails_on_canonical_email ON user_canonical_emails USING btree (canonical_email); -CREATE INDEX index_merge_trains_on_pipeline_id ON merge_trains USING btree (pipeline_id); +CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id ON user_canonical_emails USING btree (user_id); -CREATE INDEX index_merge_trains_on_user_id ON merge_trains USING btree (user_id); +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_metrics_dashboard_annotations_on_cluster_id_and_3_columns ON metrics_dashboard_annotations USING btree (cluster_id, dashboard_path, starting_at, ending_at) WHERE (cluster_id IS NOT NULL); +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_metrics_dashboard_annotations_on_environment_id_and_3_col ON metrics_dashboard_annotations USING btree (environment_id, dashboard_path, starting_at, ending_at) WHERE (environment_id IS NOT NULL); +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_metrics_dashboard_annotations_on_timespan_end ON metrics_dashboard_annotations USING btree (COALESCE(ending_at, starting_at)); +CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attributes USING btree (key, value); -CREATE INDEX index_metrics_users_starred_dashboards_on_project_id ON metrics_users_starred_dashboards USING btree (project_id); +CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key); -CREATE INDEX index_migration_jobs_on_migration_id_and_finished_at ON batched_background_migration_jobs USING btree (batched_background_migration_id, finished_at); +CREATE UNIQUE INDEX index_user_details_on_phone ON user_details USING btree (phone) WHERE (phone IS NOT NULL); -CREATE INDEX index_migration_jobs_on_migration_id_and_max_value ON batched_background_migration_jobs USING btree (batched_background_migration_id, max_value); +COMMENT ON INDEX index_user_details_on_phone IS 'JiHu-specific index'; -CREATE INDEX index_milestone_releases_on_release_id ON milestone_releases USING btree (release_id); +CREATE UNIQUE INDEX index_user_details_on_user_id ON user_details USING btree (user_id); -CREATE INDEX index_milestones_on_description_trigram ON milestones USING gin (description gin_trgm_ops); +CREATE INDEX index_user_group_callouts_on_group_id ON user_group_callouts USING btree (group_id); -CREATE INDEX index_milestones_on_due_date ON milestones USING btree (due_date); +CREATE INDEX index_user_highest_roles_on_user_id_and_highest_access_level ON user_highest_roles USING btree (user_id, highest_access_level); -CREATE INDEX index_milestones_on_group_id ON milestones USING btree (group_id); +CREATE INDEX index_user_interacted_projects_on_user_id ON user_interacted_projects USING btree (user_id); -CREATE UNIQUE INDEX index_milestones_on_project_id_and_iid ON milestones USING btree (project_id, iid); +CREATE INDEX index_user_permission_export_uploads_on_user_id_and_status ON user_permission_export_uploads USING btree (user_id, status); -CREATE INDEX index_milestones_on_title ON milestones USING btree (title); +CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled); -CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gin_trgm_ops); +CREATE UNIQUE INDEX index_user_preferences_on_user_id ON user_preferences USING btree (user_id); -CREATE INDEX index_mirror_data_non_scheduled_or_started ON project_mirror_data USING btree (next_execution_timestamp, retry_count) WHERE ((status)::text <> ALL ('{scheduled,started}'::text[])); +CREATE INDEX index_user_statuses_on_clear_status_at_not_null ON user_statuses USING btree (clear_status_at) WHERE (clear_status_at IS NOT NULL); -CREATE UNIQUE INDEX index_mr_blocks_on_blocking_and_blocked_mr_ids ON merge_request_blocks USING btree (blocking_merge_request_id, blocked_merge_request_id); +CREATE INDEX index_user_statuses_on_user_id ON user_statuses USING btree (user_id); -CREATE INDEX index_mr_cleanup_schedules_timestamps_status ON merge_request_cleanup_schedules USING btree (scheduled_at) WHERE ((completed_at IS NULL) AND (status = 0)); +CREATE UNIQUE INDEX index_user_synced_attributes_metadata_on_user_id ON user_synced_attributes_metadata USING btree (user_id); -CREATE UNIQUE INDEX index_mr_context_commits_on_merge_request_id_and_sha ON merge_request_context_commits USING btree (merge_request_id, sha); +CREATE INDEX index_users_on_accepted_term_id ON users USING btree (accepted_term_id); -CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_nulls_last ON merge_request_metrics USING btree (target_project_id, merged_at DESC NULLS LAST, id DESC); +CREATE INDEX index_users_on_admin ON users USING btree (admin); -CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_time_to_merge ON merge_request_metrics USING btree (target_project_id, merged_at, created_at) WHERE (merged_at > created_at); +CREATE UNIQUE INDEX index_users_on_confirmation_token ON users USING btree (confirmation_token); -CREATE INDEX index_namespace_admin_notes_on_namespace_id ON namespace_admin_notes USING btree (namespace_id); +CREATE INDEX index_users_on_created_at ON users USING btree (created_at); -CREATE UNIQUE INDEX index_namespace_aggregation_schedules_on_namespace_id ON namespace_aggregation_schedules USING btree (namespace_id); +CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email); -CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id); +CREATE INDEX index_users_on_email_trigram ON users USING gin (email gin_trgm_ops); -CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id); +CREATE INDEX index_users_on_feed_token ON users USING btree (feed_token); -CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree (id) WHERE (parent_id IS NOT NULL); +CREATE INDEX index_users_on_group_view ON users USING btree (group_view); -CREATE INDEX index_namespaces_id_parent_id_is_null ON namespaces USING btree (id) WHERE (parent_id IS NULL); +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_namespaces_on_created_at ON namespaces USING btree (created_at); +CREATE INDEX index_users_on_incoming_email_token ON users USING btree (incoming_email_token); -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); +CREATE INDEX index_users_on_managing_group_id ON users USING btree (managing_group_id); -CREATE INDEX index_namespaces_on_file_template_project_id ON namespaces USING btree (file_template_project_id); +CREATE INDEX index_users_on_name ON users USING btree (name); -CREATE INDEX index_namespaces_on_ldap_sync_last_successful_update_at ON namespaces USING btree (ldap_sync_last_successful_update_at); +CREATE INDEX index_users_on_name_trigram ON users USING gin (name gin_trgm_ops); -CREATE INDEX index_namespaces_on_ldap_sync_last_update_at ON namespaces USING btree (ldap_sync_last_update_at); +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 UNIQUE INDEX index_namespaces_on_name_and_parent_id ON namespaces USING btree (name, parent_id); +CREATE INDEX index_users_on_require_two_factor_authentication_from_group ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = true); -CREATE INDEX index_namespaces_on_name_trigram ON namespaces USING gin (name gin_trgm_ops); +CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token); -CREATE INDEX index_namespaces_on_owner_id ON namespaces USING btree (owner_id); +CREATE INDEX index_users_on_state ON users USING btree (state); -CREATE UNIQUE INDEX index_namespaces_on_parent_id_and_id ON namespaces USING btree (parent_id, id); +CREATE INDEX index_users_on_state_and_user_type ON users USING btree (state, user_type); -CREATE INDEX index_namespaces_on_path ON namespaces USING btree (path); +CREATE UNIQUE INDEX index_users_on_static_object_token ON users USING btree (static_object_token); -CREATE INDEX index_namespaces_on_path_trigram ON namespaces USING gin (path gin_trgm_ops); +CREATE INDEX index_users_on_unconfirmed_email ON users USING btree (unconfirmed_email) WHERE (unconfirmed_email IS NOT NULL); -CREATE UNIQUE INDEX index_namespaces_on_push_rule_id ON namespaces USING btree (push_rule_id); +CREATE UNIQUE INDEX index_users_on_unlock_token ON users USING btree (unlock_token); -CREATE INDEX index_namespaces_on_require_two_factor_authentication ON namespaces USING btree (require_two_factor_authentication); +CREATE INDEX index_users_on_user_type ON users USING btree (user_type); -CREATE UNIQUE INDEX index_namespaces_on_runners_token ON namespaces USING btree (runners_token); +CREATE INDEX index_users_on_username ON users USING btree (username); -CREATE UNIQUE INDEX index_namespaces_on_runners_token_encrypted ON namespaces USING btree (runners_token_encrypted); +CREATE INDEX index_users_on_username_trigram ON users USING gin (username gin_trgm_ops); -CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON namespaces USING btree (shared_runners_minutes_limit, extra_shared_runners_minutes_limit); +CREATE INDEX index_users_ops_dashboard_projects_on_project_id ON users_ops_dashboard_projects USING btree (project_id); -CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversal_ids); +CREATE UNIQUE INDEX index_users_ops_dashboard_projects_on_user_id_and_project_id ON users_ops_dashboard_projects USING btree (user_id, project_id); -CREATE INDEX index_namespaces_on_type_and_id_partial ON namespaces USING btree (type, id) WHERE (type IS NOT NULL); +CREATE INDEX index_users_require_two_factor_authentication_from_group_false ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = false); -CREATE INDEX index_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)); +CREATE INDEX index_users_security_dashboard_projects_on_user_id ON users_security_dashboard_projects USING btree (user_id); -CREATE UNIQUE INDEX index_note_diff_files_on_diff_note_id ON note_diff_files USING btree (diff_note_id); +CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USING btree (project_id); -CREATE INDEX index_notes_for_cherry_picked_merge_requests ON notes USING btree (project_id, commit_id) WHERE ((noteable_type)::text = 'MergeRequest'::text); +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_notes_on_author_id_and_created_at_and_id ON notes USING btree (author_id, created_at, 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 INDEX index_notes_on_commit_id ON notes USING btree (commit_id); +CREATE UNIQUE INDEX index_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date); -CREATE INDEX index_notes_on_created_at ON notes USING btree (created_at); +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_notes_on_discussion_id ON notes USING btree (discussion_id); +CREATE INDEX index_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id); -CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code); +CREATE INDEX index_vulnerabilities_on_confirmed_by_id ON vulnerabilities USING btree (confirmed_by_id); -CREATE INDEX index_notes_on_note_trigram ON notes USING gin (note gin_trgm_ops); +CREATE INDEX index_vulnerabilities_on_dismissed_by_id ON vulnerabilities USING btree (dismissed_by_id); -CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system); +CREATE INDEX index_vulnerabilities_on_due_date_sourcing_milestone_id ON vulnerabilities USING btree (due_date_sourcing_milestone_id); -CREATE INDEX index_notes_on_project_id_and_id_and_system_false ON notes USING btree (project_id, id) WHERE (NOT system); +CREATE INDEX index_vulnerabilities_on_epic_id ON vulnerabilities USING btree (epic_id); -CREATE INDEX index_notes_on_project_id_and_noteable_type ON notes USING btree (project_id, noteable_type); +CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING btree (last_edited_by_id); -CREATE INDEX index_notes_on_review_id ON notes USING btree (review_id); +CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id); -CREATE INDEX index_notification_settings_on_source_and_level_and_user ON notification_settings USING btree (source_id, source_type, level, user_id); +CREATE INDEX index_vulnerabilities_on_project_id_and_id ON vulnerabilities USING btree (project_id, id); -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 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_oauth_access_grants_on_resource_owner_id ON oauth_access_grants USING btree (resource_owner_id, application_id, created_at); +CREATE INDEX index_vulnerabilities_on_project_id_and_state_and_severity ON vulnerabilities USING btree (project_id, state, severity); -CREATE UNIQUE INDEX index_oauth_access_grants_on_token ON oauth_access_grants USING btree (token); +CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_id); -CREATE INDEX index_oauth_access_tokens_on_application_id ON oauth_access_tokens USING btree (application_id); +CREATE INDEX index_vulnerabilities_on_start_date_sourcing_milestone_id ON vulnerabilities USING btree (start_date_sourcing_milestone_id); -CREATE UNIQUE INDEX index_oauth_access_tokens_on_refresh_token ON oauth_access_tokens USING btree (refresh_token); +CREATE INDEX index_vulnerabilities_on_state_case_id ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state), id DESC); -CREATE INDEX index_oauth_access_tokens_on_resource_owner_id ON oauth_access_tokens USING btree (resource_owner_id); +CREATE INDEX index_vulnerabilities_on_state_case_id_desc ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state) DESC, id DESC); -CREATE UNIQUE INDEX index_oauth_access_tokens_on_token ON oauth_access_tokens USING btree (token); +CREATE INDEX index_vulnerabilities_on_updated_by_id ON vulnerabilities USING btree (updated_by_id); -CREATE INDEX index_oauth_applications_on_owner_id_and_owner_type ON oauth_applications USING btree (owner_id, owner_type); +CREATE INDEX index_vulnerability_exports_on_author_id ON vulnerability_exports USING btree (author_id); -CREATE UNIQUE INDEX index_oauth_applications_on_uid ON oauth_applications USING btree (uid); +CREATE INDEX index_vulnerability_exports_on_file_store ON vulnerability_exports USING btree (file_store); -CREATE INDEX index_oauth_openid_requests_on_access_grant_id ON oauth_openid_requests USING btree (access_grant_id); +CREATE INDEX index_vulnerability_exports_on_group_id_not_null ON vulnerability_exports USING btree (group_id) WHERE (group_id IS NOT NULL); -CREATE UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON keys USING btree (id, type) WHERE (public = true); +CREATE INDEX index_vulnerability_exports_on_project_id_not_null ON vulnerability_exports USING btree (project_id) WHERE (project_id IS NOT NULL); -CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USING btree (lower((extern_uid)::text), provider); +CREATE INDEX index_vulnerability_external_issue_links_on_author_id ON vulnerability_external_issue_links USING btree (author_id); -CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_usage_trends_measurements USING btree (identifier, recorded_at); +CREATE INDEX index_vulnerability_external_issue_links_on_vulnerability_id ON vulnerability_external_issue_links USING btree (vulnerability_id); -CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type); +CREATE INDEX index_vulnerability_feedback_on_author_id ON vulnerability_feedback USING btree (author_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); +CREATE INDEX index_vulnerability_feedback_on_comment_author_id ON vulnerability_feedback USING btree (comment_author_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'; +CREATE INDEX index_vulnerability_feedback_on_issue_id ON vulnerability_feedback USING btree (issue_id); -CREATE INDEX index_on_namespaces_lower_name ON namespaces USING btree (lower((name)::text)); +CREATE INDEX index_vulnerability_feedback_on_issue_id_not_null ON vulnerability_feedback USING btree (id) WHERE (issue_id IS NOT NULL); -CREATE INDEX index_on_namespaces_lower_path ON namespaces USING btree (lower((path)::text)); +CREATE INDEX index_vulnerability_feedback_on_merge_request_id ON vulnerability_feedback USING btree (merge_request_id); -CREATE INDEX index_on_oncall_schedule_escalation_rule ON incident_management_escalation_rules USING btree (oncall_schedule_id); +CREATE INDEX index_vulnerability_feedback_on_pipeline_id ON vulnerability_feedback USING btree (pipeline_id); -CREATE INDEX index_on_pages_metadata_not_migrated ON project_pages_metadata USING btree (project_id) WHERE ((deployed = true) AND (pages_deployment_id IS NULL)); +CREATE INDEX index_vulnerability_finding_signatures_on_finding_id ON vulnerability_finding_signatures USING btree (finding_id); -CREATE UNIQUE INDEX index_on_project_id_escalation_policy_name_unique ON incident_management_escalation_policies USING btree (project_id, name); +CREATE INDEX index_vulnerability_findings_remediations_on_remediation_id ON vulnerability_findings_remediations USING btree (vulnerability_remediation_id); -CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text)); +CREATE UNIQUE INDEX index_vulnerability_findings_remediations_on_unique_keys ON vulnerability_findings_remediations USING btree (vulnerability_occurrence_id, vulnerability_remediation_id); -CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text)); +CREATE UNIQUE INDEX index_vulnerability_flags_on_unique_columns ON vulnerability_flags USING btree (vulnerability_occurrence_id, flag_type, origin); -CREATE INDEX index_on_snapshots_segment_id_end_time ON analytics_devops_adoption_snapshots USING btree (segment_id, end_time); +CREATE INDEX index_vulnerability_flags_on_vulnerability_occurrence_id ON vulnerability_flags USING btree (vulnerability_occurrence_id); -CREATE INDEX index_on_snapshots_segment_id_recorded_at ON analytics_devops_adoption_snapshots USING btree (segment_id, recorded_at); +CREATE INDEX index_vulnerability_historical_statistics_on_date_and_id ON vulnerability_historical_statistics USING btree (date, id); -CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text)); +CREATE UNIQUE INDEX index_vulnerability_identifiers_on_project_id_and_fingerprint ON vulnerability_identifiers USING btree (project_id, fingerprint); -CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text)); +CREATE INDEX index_vulnerability_issue_links_on_issue_id ON vulnerability_issue_links USING btree (issue_id); -CREATE INDEX index_on_users_name_lower ON users USING btree (lower((name)::text)); +CREATE INDEX index_vulnerability_occurrence_identifiers_on_identifier_id ON vulnerability_occurrence_identifiers USING btree (identifier_id); -CREATE INDEX index_onboarding_progresses_for_create_track ON onboarding_progresses USING btree (created_at) WHERE (git_write_at IS NULL); +CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON vulnerability_occurrence_identifiers USING btree (occurrence_id, identifier_id); -CREATE INDEX index_onboarding_progresses_for_team_track ON onboarding_progresses USING btree (GREATEST(git_write_at, pipeline_created_at, trial_started_at)) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NOT NULL) AND (trial_started_at IS NOT NULL) AND (user_added_at IS NULL)); +CREATE INDEX index_vulnerability_occurrence_pipelines_occurrence_id_and_id ON vulnerability_occurrence_pipelines USING btree (occurrence_id, id DESC); -CREATE INDEX index_onboarding_progresses_for_trial_track ON onboarding_progresses USING btree (GREATEST(git_write_at, pipeline_created_at)) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NOT NULL) AND (trial_started_at IS NULL)); +CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON vulnerability_occurrence_pipelines USING btree (pipeline_id); -CREATE INDEX index_onboarding_progresses_for_verify_track ON onboarding_progresses USING btree (git_write_at) WHERE ((git_write_at IS NOT NULL) AND (pipeline_created_at IS NULL)); +CREATE INDEX index_vulnerability_occurrences_deduplication ON vulnerability_occurrences USING btree (project_id, report_type, project_fingerprint); -CREATE UNIQUE INDEX index_onboarding_progresses_on_namespace_id ON onboarding_progresses USING btree (namespace_id); +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_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_vulnerability_occurrences_on_location_image ON vulnerability_occurrences USING gin (((location -> 'image'::text))) WHERE (report_type = ANY (ARRAY[2, 7])); -CREATE INDEX index_open_project_tracker_data_on_service_id ON open_project_tracker_data USING btree (service_id); +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_operations_feature_flags_issues_on_issue_id ON operations_feature_flags_issues USING btree (issue_id); +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 UNIQUE INDEX index_operations_feature_flags_on_project_id_and_iid ON operations_feature_flags USING btree (project_id, iid); +CREATE INDEX index_vulnerability_occurrences_on_migrated_to_new_structure ON vulnerability_occurrences USING btree (migrated_to_new_structure, id); -CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_name ON operations_feature_flags USING btree (project_id, name); +CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON vulnerability_occurrences USING btree (primary_identifier_id); -CREATE UNIQUE INDEX index_operations_scopes_on_strategy_id_and_environment_scope ON operations_scopes USING btree (strategy_id, environment_scope); +CREATE INDEX index_vulnerability_occurrences_on_project_fingerprint ON vulnerability_occurrences USING btree (project_fingerprint); -CREATE INDEX index_operations_strategies_on_feature_flag_id ON operations_strategies USING btree (feature_flag_id); +CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON vulnerability_occurrences USING btree (scanner_id); -CREATE INDEX index_operations_strategies_user_lists_on_user_list_id ON operations_strategies_user_lists USING btree (user_list_id); +CREATE UNIQUE INDEX index_vulnerability_occurrences_on_uuid ON vulnerability_occurrences USING btree (uuid); -CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_iid ON operations_user_lists USING btree (project_id, iid); +CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerability_occurrences USING btree (vulnerability_id); -CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_name ON operations_user_lists USING btree (project_id, name); +CREATE INDEX index_vulnerability_reads_on_cluster_agent_id ON vulnerability_reads USING btree (cluster_agent_id) WHERE (report_type = 7); -CREATE UNIQUE INDEX index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id ON operations_feature_flags_issues USING btree (feature_flag_id, issue_id); +CREATE INDEX index_vulnerability_reads_on_location_image ON vulnerability_reads USING btree (location_image) WHERE (report_type = ANY (ARRAY[2, 7])); -CREATE UNIQUE INDEX index_ops_strategies_user_lists_on_strategy_id_and_user_list_id ON operations_strategies_user_lists USING btree (strategy_id, user_list_id); +CREATE INDEX index_vulnerability_reads_on_scanner_id ON vulnerability_reads USING btree (scanner_id); -CREATE INDEX index_packages_build_infos_on_pipeline_id ON packages_build_infos USING btree (pipeline_id); +CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid); -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_vulnerability_reads_on_vulnerability_id ON vulnerability_reads USING btree (vulnerability_id); -CREATE UNIQUE INDEX index_packages_composer_metadata_on_package_id_and_target_sha ON packages_composer_metadata USING btree (package_id, target_sha); +CREATE UNIQUE INDEX index_vulnerability_remediations_on_project_id_and_checksum ON vulnerability_remediations USING btree (project_id, checksum); -CREATE UNIQUE INDEX index_packages_conan_file_metadata_on_package_file_id ON packages_conan_file_metadata USING btree (package_file_id); +CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON vulnerability_scanners USING btree (project_id, external_id); -CREATE UNIQUE INDEX index_packages_conan_metadata_on_package_id_username_channel ON packages_conan_metadata USING btree (package_id, package_username, package_channel); +CREATE INDEX index_vulnerability_statistics_on_latest_pipeline_id ON vulnerability_statistics USING btree (latest_pipeline_id); -CREATE INDEX index_packages_debian_group_component_files_on_component_id ON packages_debian_group_component_files USING btree (component_id); +CREATE INDEX index_vulnerability_statistics_on_letter_grade ON vulnerability_statistics USING btree (letter_grade); -CREATE INDEX index_packages_debian_group_distributions_on_creator_id ON packages_debian_group_distributions USING btree (creator_id); +CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON vulnerability_statistics USING btree (project_id); -CREATE INDEX index_packages_debian_group_distributions_on_group_id ON packages_debian_group_distributions USING btree (group_id); +CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); -CREATE INDEX index_packages_debian_project_component_files_on_component_id ON packages_debian_project_component_files USING btree (component_id); +CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL); -CREATE INDEX index_packages_debian_project_distributions_on_creator_id ON packages_debian_project_distributions USING btree (creator_id); +CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id); -CREATE INDEX index_packages_debian_project_distributions_on_project_id ON packages_debian_project_distributions USING btree (project_id); +CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text); -CREATE INDEX index_packages_debian_publications_on_distribution_id ON packages_debian_publications USING btree (distribution_id); +CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id); -CREATE UNIQUE INDEX index_packages_debian_publications_on_package_id ON packages_debian_publications USING btree (package_id); +CREATE INDEX index_web_hooks_on_project_id_recent_failures ON web_hooks USING btree (project_id, recent_failures); -CREATE UNIQUE INDEX index_packages_dependencies_on_name_and_version_pattern ON packages_dependencies USING btree (name, version_pattern); +CREATE INDEX index_web_hooks_on_service_id ON web_hooks USING btree (service_id); -CREATE INDEX index_packages_dependency_links_on_dependency_id ON packages_dependency_links USING btree (dependency_id); +CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type); -CREATE INDEX index_packages_events_on_package_id ON packages_events USING btree (package_id); +CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid); -CREATE INDEX index_packages_helm_file_metadata_on_channel ON packages_helm_file_metadata USING btree (channel); +CREATE INDEX index_webauthn_registrations_on_u2f_registration_id ON webauthn_registrations USING btree (u2f_registration_id) WHERE (u2f_registration_id IS NOT NULL); -CREATE INDEX index_packages_maven_metadata_on_package_id_and_path ON packages_maven_metadata USING btree (package_id, path); +CREATE INDEX index_webauthn_registrations_on_user_id ON webauthn_registrations USING btree (user_id); -CREATE INDEX index_packages_maven_metadata_on_path ON packages_maven_metadata USING btree (path); +CREATE INDEX index_wiki_page_meta_on_project_id ON wiki_page_meta 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 UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON wiki_page_slugs USING btree (slug, wiki_page_meta_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 INDEX index_wiki_page_slugs_on_wiki_page_meta_id ON wiki_page_slugs USING btree (wiki_page_meta_id); -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 INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier); -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_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id); -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_x509_commit_signatures_on_commit_sha ON x509_commit_signatures USING btree (commit_sha); -CREATE INDEX index_packages_package_file_build_infos_on_pipeline_id ON packages_package_file_build_infos USING btree (pipeline_id); +CREATE INDEX index_x509_commit_signatures_on_project_id ON x509_commit_signatures USING btree (project_id); -CREATE INDEX index_packages_package_files_on_file_store ON packages_package_files USING btree (file_store); +CREATE INDEX index_x509_commit_signatures_on_x509_certificate_id ON x509_commit_signatures USING btree (x509_certificate_id); -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_x509_issuers_on_subject_key_identifier ON x509_issuers USING btree (subject_key_identifier); -CREATE INDEX index_packages_package_files_on_verification_state ON packages_package_files USING btree (verification_state); +CREATE INDEX index_zentao_tracker_data_on_integration_id ON zentao_tracker_data USING btree (integration_id); -CREATE INDEX index_packages_packages_on_creator_id ON packages_packages USING btree (creator_id); +CREATE INDEX index_zoom_meetings_on_issue_id ON zoom_meetings USING btree (issue_id); -CREATE INDEX index_packages_packages_on_id_and_created_at ON packages_packages USING btree (id, created_at); +CREATE UNIQUE INDEX index_zoom_meetings_on_issue_id_and_issue_status ON zoom_meetings USING btree (issue_id, issue_status) WHERE (issue_status = 1); -CREATE INDEX index_packages_packages_on_name_trigram ON packages_packages USING gin (name gin_trgm_ops); +CREATE INDEX index_zoom_meetings_on_issue_status ON zoom_meetings USING btree (issue_status); -CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_packages USING btree (project_id, created_at); +CREATE INDEX index_zoom_meetings_on_project_id ON zoom_meetings USING btree (project_id); -CREATE INDEX index_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type); +CREATE INDEX issue_id_issues_prometheus_alert_events_index ON issues_prometheus_alert_events USING btree (prometheus_alert_event_id); -CREATE INDEX index_packages_packages_on_project_id_and_status ON packages_packages USING btree (project_id, status); +CREATE INDEX issue_id_issues_self_managed_rometheus_alert_events_index ON issues_self_managed_prometheus_alert_events USING btree (self_managed_prometheus_alert_event_id); -CREATE INDEX index_packages_packages_on_project_id_and_version ON packages_packages USING btree (project_id, version); +CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_and_note_id_index ON issue_user_mentions USING btree (issue_id, note_id); -CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4)); +CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_index ON issue_user_mentions USING btree (issue_id) WHERE (note_id IS NULL); -CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (package_id); +CREATE UNIQUE INDEX kubernetes_namespaces_cluster_and_namespace ON clusters_kubernetes_namespaces USING btree (cluster_id, namespace); -CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC); +CREATE INDEX merge_request_mentions_temp_index ON merge_requests USING btree (id) WHERE ((description ~~ '%@%'::text) OR ((title)::text ~~ '%@%'::text)); -CREATE INDEX index_pages_deployments_on_ci_build_id ON pages_deployments USING btree (ci_build_id); +CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_and_note_id_index ON merge_request_user_mentions USING btree (merge_request_id, note_id); -CREATE INDEX index_pages_deployments_on_file_store_and_id ON pages_deployments USING btree (file_store, id); +CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_index ON merge_request_user_mentions USING btree (merge_request_id) WHERE (note_id IS NULL); -CREATE INDEX index_pages_deployments_on_project_id ON pages_deployments USING btree (project_id); +CREATE INDEX merge_requests_state_id_temp_index ON merge_requests USING btree (id) WHERE (state_id = ANY (ARRAY[2, 3])); -CREATE INDEX index_pages_domain_acme_orders_on_challenge_token ON pages_domain_acme_orders USING btree (challenge_token); +CREATE INDEX note_mentions_temp_index ON notes USING btree (id, noteable_type) WHERE (note ~~ '%@%'::text); -CREATE INDEX index_pages_domain_acme_orders_on_pages_domain_id ON pages_domain_acme_orders USING btree (pages_domain_id); +CREATE UNIQUE INDEX one_canonical_wiki_page_slug_per_metadata ON wiki_page_slugs USING btree (wiki_page_meta_id) WHERE (canonical = true); -CREATE INDEX index_pages_domains_need_auto_ssl_renewal_user_provided ON pages_domains USING btree (id) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false) AND (certificate_source = 0)); +CREATE INDEX package_name_index ON packages_packages USING btree (name); -CREATE INDEX index_pages_domains_need_auto_ssl_renewal_valid_not_after ON pages_domains USING btree (certificate_valid_not_after) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false)); +CREATE INDEX packages_packages_failed_verification ON packages_package_files USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); -CREATE UNIQUE INDEX index_pages_domains_on_domain_and_wildcard ON pages_domains USING btree (domain, wildcard); +CREATE INDEX packages_packages_needs_verification ON packages_package_files USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); -CREATE INDEX index_pages_domains_on_domain_lowercase ON pages_domains USING btree (lower((domain)::text)); +CREATE INDEX packages_packages_pending_verification ON packages_package_files USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); -CREATE INDEX index_pages_domains_on_project_id ON pages_domains USING btree (project_id); +CREATE UNIQUE INDEX partial_index_bulk_import_exports_on_group_id_and_relation ON bulk_import_exports USING btree (group_id, relation) WHERE (group_id IS NOT NULL); -CREATE INDEX index_pages_domains_on_project_id_and_enabled_until ON pages_domains USING btree (project_id, enabled_until); +CREATE UNIQUE INDEX partial_index_bulk_import_exports_on_project_id_and_relation ON bulk_import_exports USING btree (project_id, relation) WHERE (project_id IS NOT NULL); -CREATE INDEX index_pages_domains_on_remove_at ON pages_domains USING btree (remove_at); +CREATE INDEX partial_index_ci_builds_on_scheduled_at_with_scheduled_jobs ON ci_builds USING btree (scheduled_at) WHERE ((scheduled_at IS NOT NULL) AND ((type)::text = 'Ci::Build'::text) AND ((status)::text = 'scheduled'::text)); -CREATE INDEX index_pages_domains_on_scope ON pages_domains USING btree (scope); +CREATE INDEX partial_index_deployments_for_legacy_successful_deployments ON deployments USING btree (id) WHERE ((finished_at IS NULL) AND (status = 2)); -CREATE INDEX index_pages_domains_on_usage ON pages_domains USING btree (usage); +CREATE INDEX partial_index_deployments_for_project_id_and_tag ON deployments USING btree (project_id) WHERE (tag IS TRUE); -CREATE INDEX index_pages_domains_on_verified_at ON pages_domains USING btree (verified_at); +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 INDEX index_pages_domains_on_verified_at_and_enabled_until ON pages_domains USING btree (verified_at, enabled_until); +CREATE UNIQUE INDEX partial_index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id) WHERE (project_id IS NOT NULL); -CREATE INDEX index_pages_domains_on_wildcard ON pages_domains USING btree (wildcard); +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 index_partial_am_alerts_on_project_id_and_fingerprint ON alert_management_alerts USING btree (project_id, fingerprint) WHERE (status <> 2); +CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_mentions USING btree (snippet_id) WHERE (note_id IS NULL); -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 taggings_idx ON taggings USING btree (tag_id, taggable_id, taggable_type, context, tagger_id, tagger_type); -CREATE UNIQUE INDEX index_partitioned_foreign_keys_unique_index ON partitioned_foreign_keys USING btree (to_table, from_table, from_column); +CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id); -CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at); +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 index_path_locks_on_path ON path_locks USING btree (path); +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 index_path_locks_on_project_id ON path_locks USING btree (project_id); +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 index_path_locks_on_user_id ON path_locks USING btree (user_id); +CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state); -CREATE UNIQUE INDEX index_personal_access_tokens_on_token_digest ON personal_access_tokens USING btree (token_digest); +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 index_personal_access_tokens_on_user_id ON personal_access_tokens USING btree (user_id); +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 UNIQUE INDEX index_plan_limits_on_plan_id ON plan_limits USING btree (plan_id); +CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2); -CREATE UNIQUE INDEX index_plans_on_name ON plans USING btree (name); +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 UNIQUE INDEX index_pool_repositories_on_disk_path ON pool_repositories USING btree (disk_path); +CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[])); -CREATE INDEX index_pool_repositories_on_shard_id ON pool_repositories USING btree (shard_id); +CREATE UNIQUE INDEX tmp_index_on_tmp_project_id_on_namespaces ON namespaces USING btree (tmp_project_id); -CREATE UNIQUE INDEX index_pool_repositories_on_source_project_id_and_shard_id ON pool_repositories USING btree (source_project_id, shard_id); +CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2); -CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_indexes USING btree (name); +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 index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier); +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 index_programming_languages_on_name ON programming_languages USING btree (name); +CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); -CREATE INDEX index_project_access_tokens_on_project_id ON project_access_tokens USING btree (project_id); +CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name); -CREATE UNIQUE INDEX index_project_aliases_on_name ON project_aliases USING btree (name); +CREATE UNIQUE INDEX uniq_pkgs_deb_proj_architectures_on_distribution_id_and_name ON packages_debian_project_architectures USING btree (distribution_id, name); -CREATE INDEX index_project_aliases_on_project_id ON project_aliases USING btree (project_id); +CREATE UNIQUE INDEX uniq_pkgs_deb_proj_components_on_distribution_id_and_name ON packages_debian_project_components USING btree (distribution_id, name); -CREATE UNIQUE INDEX index_project_auto_devops_on_project_id ON project_auto_devops USING btree (project_id); +CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_codename ON packages_debian_group_distributions USING btree (group_id, codename); -CREATE UNIQUE INDEX index_project_ci_cd_settings_on_project_id ON project_ci_cd_settings USING btree (project_id); +CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_suite ON packages_debian_group_distributions USING btree (group_id, suite); -CREATE UNIQUE INDEX index_project_ci_feature_usages_unique_columns ON project_ci_feature_usages USING btree (project_id, feature, default_branch); +CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_codename ON packages_debian_project_distributions USING btree (project_id, codename); -CREATE INDEX index_project_compliance_framework_settings_on_framework_id ON project_compliance_framework_settings USING btree (framework_id); +CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_suite ON packages_debian_project_distributions USING btree (project_id, suite); -CREATE INDEX index_project_compliance_framework_settings_on_project_id ON project_compliance_framework_settings USING btree (project_id); +CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id); -CREATE INDEX index_project_custom_attributes_on_key_and_value ON project_custom_attributes USING btree (key, value); +CREATE INDEX user_follow_users_followee_id_idx ON user_follow_users USING btree (followee_id); -CREATE UNIQUE INDEX index_project_custom_attributes_on_project_id_and_key ON project_custom_attributes USING btree (project_id, key); +CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); -CREATE UNIQUE INDEX index_project_daily_statistics_on_project_id_and_date ON project_daily_statistics USING btree (project_id, date DESC); +CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); -CREATE INDEX index_project_deploy_tokens_on_deploy_token_id ON project_deploy_tokens USING btree (deploy_token_id); +CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name))); -CREATE UNIQUE INDEX index_project_deploy_tokens_on_project_id_and_deploy_token_id ON project_deploy_tokens USING btree (project_id, deploy_token_id); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_created_at_author_id_idx; -CREATE UNIQUE INDEX index_project_export_jobs_on_jid ON project_export_jobs USING btree (jid); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_export_jobs_on_project_id_and_jid ON project_export_jobs USING btree (project_id, jid); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_pkey; -CREATE INDEX index_project_export_jobs_on_project_id_and_status ON project_export_jobs USING btree (project_id, status); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_created_at_author_id_idx; -CREATE INDEX index_project_export_jobs_on_status ON project_export_jobs USING btree (status); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_feature_usages_on_project_id ON project_feature_usages USING btree (project_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_pkey; -CREATE UNIQUE INDEX index_project_features_on_project_id ON project_features USING btree (project_id); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_created_at_author_id_idx; -CREATE INDEX index_project_features_on_project_id_bal_20 ON project_features USING btree (project_id) WHERE (builds_access_level = 20); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_entity_id_entity_type_id_author_id_crea_idx; -CREATE UNIQUE INDEX index_project_features_on_project_id_include_container_registry ON project_features USING btree (project_id) INCLUDE (container_registry_access_level); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_pkey; -COMMENT ON INDEX index_project_features_on_project_id_include_container_registry IS 'Included column (container_registry_access_level) improves performance of the ContainerRepository.for_group_and_its_subgroups scope query'; +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_created_at_author_id_idx; -CREATE INDEX index_project_features_on_project_id_ral_20 ON project_features USING btree (project_id) WHERE (repository_access_level = 20); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_group_links_on_group_id ON project_group_links USING btree (group_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_pkey; -CREATE INDEX index_project_group_links_on_project_id ON project_group_links USING btree (project_id); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_created_at_author_id_idx; -CREATE INDEX index_project_import_data_on_project_id ON project_import_data USING btree (project_id); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_mirror_data_on_last_successful_update_at ON project_mirror_data USING btree (last_successful_update_at); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_pkey; -CREATE INDEX index_project_mirror_data_on_last_update_at_and_retry_count ON project_mirror_data USING btree (last_update_at, retry_count); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_created_at_author_id_idx; -CREATE UNIQUE INDEX index_project_mirror_data_on_project_id ON project_mirror_data USING btree (project_id); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_mirror_data_on_status ON project_mirror_data USING btree (status); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_pkey; -CREATE INDEX index_project_pages_metadata_on_artifacts_archive_id ON project_pages_metadata USING btree (artifacts_archive_id); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_created_at_author_id_idx; -CREATE INDEX index_project_pages_metadata_on_pages_deployment_id ON project_pages_metadata USING btree (pages_deployment_id); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_pages_metadata_on_project_id_and_deployed_is_true ON project_pages_metadata USING btree (project_id) WHERE (deployed = true); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_pkey; -CREATE UNIQUE INDEX index_project_repositories_on_disk_path ON project_repositories USING btree (disk_path); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_created_at_author_id_idx; -CREATE UNIQUE INDEX index_project_repositories_on_project_id ON project_repositories USING btree (project_id); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_repositories_on_shard_id ON project_repositories USING btree (shard_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_pkey; -CREATE INDEX index_project_repositories_on_shard_id_and_project_id ON project_repositories USING btree (shard_id, project_id); +ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_created_at_author_id_idx; -CREATE UNIQUE INDEX index_project_repository_states_on_project_id ON project_repository_states USING btree (project_id); +ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_entity_id_entity_type_id_author_id_crea_idx; -CREATE INDEX index_project_repository_storage_moves_on_project_id ON project_repository_storage_moves USING btree (project_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_pkey; -CREATE INDEX index_project_settings_on_project_id_partially ON project_settings USING btree (project_id) WHERE (has_vulnerabilities IS TRUE); +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; -CREATE UNIQUE INDEX index_project_settings_on_push_rule_id ON project_settings USING btree (push_rule_id); +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; -CREATE INDEX index_project_stages_on_stage_event_hash_id ON analytics_cycle_analytics_project_stages USING btree (stage_event_hash_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202308_pkey; -CREATE INDEX index_project_statistics_on_namespace_id ON project_statistics USING btree (namespace_id); +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; -CREATE INDEX index_project_statistics_on_packages_size_and_project_id ON project_statistics USING btree (packages_size, project_id); +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; -CREATE UNIQUE INDEX index_project_statistics_on_project_id ON project_statistics USING btree (project_id); +ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202309_pkey; -CREATE INDEX index_project_statistics_on_repository_size_and_project_id ON project_statistics USING btree (repository_size, project_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration__idx; -CREATE INDEX index_project_statistics_on_storage_size_and_project_id ON project_statistics USING btree (storage_size, project_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx1; -CREATE INDEX index_project_statistics_on_wiki_size_and_project_id ON project_statistics USING btree (wiki_size, project_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx2; -CREATE INDEX index_project_topics_on_project_id ON project_topics USING btree (project_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx3; -CREATE UNIQUE INDEX index_project_topics_on_project_id_and_topic_id ON project_topics USING btree (project_id, topic_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx4; -CREATE INDEX index_project_topics_on_topic_id ON project_topics USING btree (topic_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx5; -CREATE UNIQUE INDEX index_project_tracing_settings_on_project_id ON project_tracing_settings USING btree (project_id); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx6; -CREATE INDEX index_projects_aimed_for_deletion ON projects USING btree (marked_for_deletion_at) WHERE ((marked_for_deletion_at IS NOT NULL) AND (pending_delete = false)); +ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx7; -CREATE INDEX index_projects_api_created_at_id_desc ON projects USING btree (created_at, id DESC); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000_pkey; -CREATE INDEX index_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false)); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202303_pkey; -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)); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202304_pkey; -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)); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305_pkey; -CREATE INDEX index_projects_api_last_activity_at_id_desc ON projects USING btree (last_activity_at, id DESC); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306_pkey; -CREATE INDEX index_projects_api_name_id_desc ON projects USING btree (name, id DESC); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307_pkey; -CREATE INDEX index_projects_api_path_id_desc ON projects USING btree (path, id DESC); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308_pkey; -CREATE INDEX index_projects_api_updated_at_id_desc ON projects USING btree (updated_at, id DESC); +ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309_pkey; -CREATE INDEX index_projects_api_vis20_created_at ON projects USING btree (created_at, id) WHERE (visibility_level = 20); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301_pkey; -CREATE INDEX index_projects_api_vis20_last_activity_at ON projects USING btree (last_activity_at, id) WHERE (visibility_level = 20); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302_pkey; -CREATE INDEX index_projects_api_vis20_name ON projects USING btree (name, id) WHERE (visibility_level = 20); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303_pkey; -CREATE INDEX index_projects_api_vis20_path ON projects USING btree (path, id) WHERE (visibility_level = 20); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304_pkey; -CREATE INDEX index_projects_api_vis20_updated_at ON projects USING btree (updated_at, id) WHERE (visibility_level = 20); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305_pkey; -CREATE INDEX index_projects_on_created_at_and_id ON projects USING btree (created_at, id); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306_pkey; -CREATE INDEX index_projects_on_creator_id_and_created_at_and_id ON projects USING btree (creator_id, created_at, id); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307_pkey; -CREATE INDEX index_projects_on_creator_id_and_id ON projects USING btree (creator_id, id); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308_pkey; -CREATE INDEX index_projects_on_creator_id_import_type_and_created_at_partial ON projects USING btree (creator_id, import_type, created_at) WHERE (import_type IS NOT NULL); +ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309_pkey; -CREATE INDEX index_projects_on_description_trigram ON projects USING gin (description gin_trgm_ops); +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; -CREATE INDEX index_projects_on_id_and_archived_and_pending_delete ON projects USING btree (id) WHERE ((archived = false) AND (pending_delete = false)); +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; -CREATE UNIQUE INDEX index_projects_on_id_partial_for_visibility ON projects USING btree (id) WHERE (visibility_level = ANY (ARRAY[10, 20])); +ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx1; -CREATE INDEX index_projects_on_id_service_desk_enabled ON projects USING btree (id) WHERE (service_desk_enabled = true); +ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx2; -CREATE INDEX index_projects_on_last_activity_at_and_id ON projects USING btree (last_activity_at, id); +ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx3; -CREATE INDEX index_projects_on_last_repository_check_at ON projects USING btree (last_repository_check_at) WHERE (last_repository_check_at IS NOT NULL); +ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx4; -CREATE INDEX index_projects_on_last_repository_check_failed ON projects USING btree (last_repository_check_failed); +ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx5; -CREATE INDEX index_projects_on_last_repository_updated_at ON projects USING btree (last_repository_updated_at); +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; -CREATE INDEX index_projects_on_lower_name ON projects USING btree (lower((name)::text)); +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; -CREATE INDEX index_projects_on_marked_for_deletion_by_user_id ON projects USING btree (marked_for_deletion_by_user_id) WHERE (marked_for_deletion_by_user_id IS NOT NULL); +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; -CREATE INDEX index_projects_on_mirror_creator_id_created_at ON projects USING btree (creator_id, created_at) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); +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; -CREATE INDEX index_projects_on_mirror_id_where_mirror_and_trigger_builds ON projects USING btree (id) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); +ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx3; -CREATE INDEX index_projects_on_mirror_last_successful_update_at ON projects USING btree (mirror_last_successful_update_at); +ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx4; -CREATE INDEX index_projects_on_mirror_user_id ON projects USING btree (mirror_user_id); +ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx5; -CREATE INDEX index_projects_on_name_and_id ON projects USING btree (name, id); +ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx6; -CREATE INDEX index_projects_on_name_trigram ON projects USING gin (name gin_trgm_ops); +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; -CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (namespace_id, id); +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; -CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id); +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; -CREATE INDEX index_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301_pkey; -CREATE INDEX index_projects_on_pending_delete ON projects USING btree (pending_delete); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302_pkey; -CREATE INDEX index_projects_on_pool_repository_id ON projects USING btree (pool_repository_id) WHERE (pool_repository_id IS NOT NULL); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303_pkey; -CREATE UNIQUE INDEX index_projects_on_project_namespace_id ON projects USING btree (project_namespace_id); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304_pkey; -CREATE INDEX index_projects_on_repository_storage ON projects USING btree (repository_storage); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305_pkey; -CREATE INDEX index_projects_on_runners_token ON projects USING btree (runners_token); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306_pkey; -CREATE INDEX index_projects_on_runners_token_encrypted ON projects USING btree (runners_token_encrypted); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307_pkey; -CREATE INDEX index_projects_on_star_count ON projects USING btree (star_count); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308_pkey; -CREATE INDEX index_projects_on_updated_at_and_id ON projects USING btree (updated_at, id); +ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309_pkey; -CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events USING btree (prometheus_alert_id, payload_key); +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; -CREATE INDEX index_prometheus_alert_events_on_project_id_and_status ON prometheus_alert_events USING btree (project_id, status); +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; -CREATE UNIQUE INDEX index_prometheus_alerts_metric_environment ON prometheus_alerts USING btree (project_id, prometheus_metric_id, environment_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx1; -CREATE INDEX index_prometheus_alerts_on_environment_id ON prometheus_alerts USING btree (environment_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx2; -CREATE INDEX index_prometheus_alerts_on_prometheus_metric_id ON prometheus_alerts USING btree (prometheus_metric_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx3; -CREATE INDEX index_prometheus_metrics_on_common ON prometheus_metrics USING btree (common); +ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx4; -CREATE INDEX index_prometheus_metrics_on_group ON prometheus_metrics USING btree ("group"); +ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx5; -CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON prometheus_metrics USING btree (identifier) WHERE (project_id IS NULL); +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; -CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON prometheus_metrics USING btree (identifier, project_id); +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; -CREATE INDEX index_prometheus_metrics_on_project_id ON prometheus_metrics USING btree (project_id); +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; -CREATE INDEX index_protected_branch_merge_access ON protected_branch_merge_access_levels USING btree (protected_branch_id); +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; -CREATE INDEX index_protected_branch_merge_access_levels_on_group_id ON protected_branch_merge_access_levels USING btree (group_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx3; -CREATE INDEX index_protected_branch_merge_access_levels_on_user_id ON protected_branch_merge_access_levels USING btree (user_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx4; -CREATE INDEX index_protected_branch_push_access ON protected_branch_push_access_levels USING btree (protected_branch_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx5; -CREATE INDEX index_protected_branch_push_access_levels_on_group_id ON protected_branch_push_access_levels USING btree (group_id); +ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx6; -CREATE INDEX index_protected_branch_push_access_levels_on_user_id ON protected_branch_push_access_levels USING btree (user_id); +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; -CREATE INDEX index_protected_branch_unprotect_access ON protected_branch_unprotect_access_levels USING btree (protected_branch_id); +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; -CREATE INDEX index_protected_branch_unprotect_access_levels_on_group_id ON protected_branch_unprotect_access_levels USING btree (group_id); +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; -CREATE INDEX index_protected_branch_unprotect_access_levels_on_user_id ON protected_branch_unprotect_access_levels USING btree (user_id); +ALTER INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ATTACH PARTITION gitlab_partitions_dynamic.index_01e3390fac; -CREATE INDEX index_protected_branches_on_project_id ON protected_branches USING btree (project_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_1554dc6f11; -CREATE INDEX index_protected_environment_deploy_access ON protected_environment_deploy_access_levels USING btree (protected_environment_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_719c6187cb; -CREATE INDEX index_protected_environment_deploy_access_levels_on_group_id ON protected_environment_deploy_access_levels USING btree (group_id); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_962081978f; -CREATE INDEX index_protected_environment_deploy_access_levels_on_user_id ON protected_environment_deploy_access_levels USING btree (user_id); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_fdb8d5eeea; -CREATE UNIQUE INDEX index_protected_environments_on_group_id_and_name ON protected_environments USING btree (group_id, name) WHERE (group_id IS NOT NULL); +ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1_pkey; -CREATE INDEX index_protected_environments_on_project_id ON protected_environments USING btree (project_id); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_000000_pkey; -CREATE UNIQUE INDEX index_protected_environments_on_project_id_and_name ON protected_environments USING btree (project_id, name); +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; -CREATE INDEX index_protected_tag_create_access ON protected_tag_create_access_levels USING btree (protected_tag_id); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202302_pkey; -CREATE INDEX index_protected_tag_create_access_levels_on_group_id ON protected_tag_create_access_levels USING btree (group_id); +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; -CREATE INDEX index_protected_tag_create_access_levels_on_user_id ON protected_tag_create_access_levels USING btree (user_id); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202303_pkey; -CREATE INDEX index_protected_tags_on_project_id ON protected_tags USING btree (project_id); +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; -CREATE UNIQUE INDEX index_protected_tags_on_project_id_and_name ON protected_tags USING btree (project_id, name); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202304_pkey; -CREATE INDEX index_push_rules_on_is_sample ON push_rules USING btree (is_sample) WHERE is_sample; +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; -CREATE INDEX index_push_rules_on_project_id ON push_rules USING btree (project_id); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202305_pkey; -CREATE UNIQUE INDEX index_raw_usage_data_on_recorded_at ON raw_usage_data USING btree (recorded_at); +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; -CREATE UNIQUE INDEX index_redirect_routes_on_path ON redirect_routes USING btree (path); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202306_pkey; -CREATE UNIQUE INDEX index_redirect_routes_on_path_unique_text_pattern_ops ON redirect_routes USING btree (lower((path)::text) varchar_pattern_ops); +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; -CREATE INDEX index_redirect_routes_on_source_type_and_source_id ON redirect_routes USING btree (source_type, source_id); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202307_pkey; -CREATE UNIQUE INDEX index_release_links_on_release_id_and_name ON release_links USING btree (release_id, name); +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; -CREATE UNIQUE INDEX index_release_links_on_release_id_and_url ON release_links USING btree (release_id, url); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202308_pkey; -CREATE INDEX index_releases_on_author_id ON releases USING btree (author_id); +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; -CREATE INDEX index_releases_on_project_id_and_tag ON releases USING btree (project_id, tag); +ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202309_pkey; -CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at); +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; -CREATE INDEX index_remote_mirrors_on_last_successful_update_at ON remote_mirrors USING btree (last_successful_update_at); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202212_pkey; -CREATE INDEX index_remote_mirrors_on_project_id ON remote_mirrors USING btree (project_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202301_pkey; -CREATE INDEX index_required_code_owners_sections_on_protected_branch_id ON required_code_owners_sections USING btree (protected_branch_id); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_created_at_web_hook_id_idx; -CREATE INDEX index_requirements_management_test_reports_on_author_id ON requirements_management_test_reports USING btree (author_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_pkey; -CREATE INDEX index_requirements_management_test_reports_on_build_id ON requirements_management_test_reports USING btree (build_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_web_hook_id_idx; -CREATE INDEX index_requirements_management_test_reports_on_issue_id ON requirements_management_test_reports USING btree (issue_id); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_created_at_web_hook_id_idx; -CREATE INDEX index_requirements_management_test_reports_on_requirement_id ON requirements_management_test_reports USING btree (requirement_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_pkey; -CREATE INDEX index_requirements_on_author_id ON requirements USING btree (author_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_web_hook_id_idx; -CREATE INDEX index_requirements_on_created_at ON requirements USING btree (created_at); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_created_at_web_hook_id_idx; -CREATE UNIQUE INDEX index_requirements_on_issue_id ON requirements USING btree (issue_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_pkey; -CREATE INDEX index_requirements_on_project_id ON requirements USING btree (project_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_web_hook_id_idx; -CREATE UNIQUE INDEX index_requirements_on_project_id_and_iid ON requirements USING btree (project_id, iid) WHERE (project_id IS NOT NULL); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_created_at_web_hook_id_idx; -CREATE INDEX index_requirements_on_state ON requirements USING btree (state); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_pkey; -CREATE INDEX index_requirements_on_title_trigram ON requirements USING gin (title gin_trgm_ops); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_web_hook_id_idx; -CREATE INDEX index_requirements_on_updated_at ON requirements USING btree (updated_at); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_created_at_web_hook_id_idx; -CREATE INDEX index_resource_iteration_events_on_issue_id ON resource_iteration_events USING btree (issue_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_pkey; -CREATE INDEX index_resource_iteration_events_on_iteration_id ON resource_iteration_events USING btree (iteration_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_web_hook_id_idx; -CREATE INDEX index_resource_iteration_events_on_iteration_id_and_add_action ON resource_iteration_events USING btree (iteration_id) WHERE (action = 1); +ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_created_at_web_hook_id_idx; -CREATE INDEX index_resource_iteration_events_on_merge_request_id ON resource_iteration_events USING btree (merge_request_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_pkey; -CREATE INDEX index_resource_iteration_events_on_user_id ON resource_iteration_events USING btree (user_id); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_web_hook_id_idx; -CREATE INDEX index_resource_label_events_issue_id_label_id_action ON resource_label_events USING btree (issue_id, label_id, action); +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; -CREATE INDEX index_resource_label_events_on_epic_id ON resource_label_events USING btree (epic_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308_pkey; -CREATE INDEX index_resource_label_events_on_label_id_and_action ON resource_label_events USING btree (label_id, action); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308_web_hook_id_idx; -CREATE INDEX index_resource_label_events_on_merge_request_id_label_id_action ON resource_label_events USING btree (merge_request_id, label_id, action); +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; -CREATE INDEX index_resource_label_events_on_user_id ON resource_label_events USING btree (user_id); +ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309_pkey; -CREATE INDEX index_resource_milestone_events_created_at ON resource_milestone_events USING btree (created_at); +ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309_web_hook_id_idx; -CREATE INDEX index_resource_milestone_events_on_issue_id ON resource_milestone_events USING btree (issue_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00_pkey; -CREATE INDEX index_resource_milestone_events_on_merge_request_id ON resource_milestone_events USING btree (merge_request_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01_pkey; -CREATE INDEX index_resource_milestone_events_on_milestone_id ON resource_milestone_events USING btree (milestone_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02_pkey; -CREATE INDEX index_resource_milestone_events_on_milestone_id_and_add_action ON resource_milestone_events USING btree (milestone_id) WHERE (action = 1); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03_pkey; -CREATE INDEX index_resource_milestone_events_on_user_id ON resource_milestone_events USING btree (user_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04_pkey; -CREATE INDEX index_resource_state_events_on_epic_id ON resource_state_events USING btree (epic_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05_pkey; -CREATE INDEX index_resource_state_events_on_issue_id_and_created_at ON resource_state_events USING btree (issue_id, created_at); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06_pkey; -CREATE INDEX index_resource_state_events_on_merge_request_id ON resource_state_events USING btree (merge_request_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07_pkey; -CREATE INDEX index_resource_state_events_on_source_merge_request_id ON resource_state_events USING btree (source_merge_request_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08_pkey; -CREATE INDEX index_resource_state_events_on_user_id ON resource_state_events USING btree (user_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09_pkey; -CREATE INDEX index_resource_weight_events_on_issue_id_and_created_at ON resource_weight_events USING btree (issue_id, created_at); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10_pkey; -CREATE INDEX index_resource_weight_events_on_issue_id_and_weight ON resource_weight_events USING btree (issue_id, weight); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11_pkey; -CREATE INDEX index_resource_weight_events_on_user_id ON resource_weight_events USING btree (user_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12_pkey; -CREATE INDEX index_reviews_on_author_id ON reviews USING btree (author_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13_pkey; -CREATE INDEX index_reviews_on_merge_request_id ON reviews USING btree (merge_request_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14_pkey; -CREATE INDEX index_reviews_on_project_id ON reviews USING btree (project_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15_pkey; -CREATE INDEX index_route_on_name_trigram ON routes USING gin (name gin_trgm_ops); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16_pkey; -CREATE UNIQUE INDEX index_routes_on_path ON routes USING btree (path); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17_pkey; -CREATE INDEX index_routes_on_path_text_pattern_ops ON routes USING btree (path varchar_pattern_ops); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18_pkey; -CREATE INDEX index_routes_on_path_trigram ON routes USING gin (path gin_trgm_ops); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19_pkey; -CREATE UNIQUE INDEX index_routes_on_source_type_and_source_id ON routes USING btree (source_type, source_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20_pkey; -CREATE UNIQUE INDEX index_saml_group_links_on_group_id_and_saml_group_name ON saml_group_links USING btree (group_id, saml_group_name); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21_pkey; -CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (group_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22_pkey; -CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23_pkey; -CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24_pkey; -CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identities USING btree (user_id, group_id); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25_pkey; -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); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26_pkey; -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]))); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27_pkey; -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)); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28_pkey; -CREATE INDEX index_security_findings_on_confidence ON security_findings USING btree (confidence); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29_pkey; -CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings USING btree (project_fingerprint); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30_pkey; -CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated); +ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31_pkey; -CREATE UNIQUE INDEX index_security_findings_on_scan_id_and_position ON security_findings USING btree (scan_id, "position"); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00_pkey; -CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01_pkey; -CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02_pkey; -CREATE UNIQUE INDEX index_security_findings_on_uuid_and_scan_id ON security_findings USING btree (uuid, scan_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03_pkey; -CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04_pkey; -CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05_pkey; -CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (pipeline_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06_pkey; -CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07_pkey; -CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08_pkey; -CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09_pkey; -CREATE UNIQUE INDEX index_sent_notifications_on_reply_key ON sent_notifications USING btree (reply_key); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10_pkey; -CREATE UNIQUE INDEX index_sentry_issues_on_issue_id ON sentry_issues USING btree (issue_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11_pkey; -CREATE INDEX index_sentry_issues_on_sentry_issue_identifier ON sentry_issues USING btree (sentry_issue_identifier); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12_pkey; -CREATE INDEX index_serverless_domain_cluster_on_creator_id ON serverless_domain_cluster USING btree (creator_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13_pkey; -CREATE INDEX index_serverless_domain_cluster_on_pages_domain_id ON serverless_domain_cluster USING btree (pages_domain_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14_pkey; -CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15_pkey; -CREATE INDEX index_service_desk_settings_on_file_template_project_id ON service_desk_settings USING btree (file_template_project_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16_pkey; -CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17_pkey; -CREATE UNIQUE INDEX index_site_profile_secret_variables_on_site_profile_id_and_key ON dast_site_profile_secret_variables USING btree (dast_site_profile_id, key); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18_pkey; -CREATE INDEX index_slack_integrations_on_service_id ON slack_integrations USING btree (service_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19_pkey; -CREATE UNIQUE INDEX index_slack_integrations_on_team_id_and_alias ON slack_integrations USING btree (team_id, alias); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20_pkey; -CREATE UNIQUE INDEX index_smartcard_identities_on_subject_and_issuer ON smartcard_identities USING btree (subject, issuer); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21_pkey; -CREATE INDEX index_smartcard_identities_on_user_id ON smartcard_identities USING btree (user_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22_pkey; -CREATE INDEX index_snippet_on_id_and_project_id ON snippets USING btree (id, project_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23_pkey; -CREATE INDEX index_snippet_repositories_failed_verification ON snippet_repositories USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24_pkey; -CREATE INDEX index_snippet_repositories_needs_verification ON snippet_repositories USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25_pkey; -CREATE UNIQUE INDEX index_snippet_repositories_on_disk_path ON snippet_repositories USING btree (disk_path); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26_pkey; -CREATE INDEX index_snippet_repositories_on_shard_id ON snippet_repositories USING btree (shard_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27_pkey; -CREATE INDEX index_snippet_repositories_pending_verification ON snippet_repositories USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28_pkey; -CREATE INDEX index_snippet_repositories_verification_state ON snippet_repositories USING btree (verification_state); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29_pkey; -CREATE INDEX index_snippet_repository_storage_moves_on_snippet_id ON snippet_repository_storage_moves USING btree (snippet_id); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30_pkey; -CREATE UNIQUE INDEX index_snippet_user_mentions_on_note_id ON snippet_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31_pkey; -CREATE INDEX index_snippets_on_author_id ON snippets USING btree (author_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_000925dbd7; -CREATE INDEX index_snippets_on_content_trigram ON snippets USING gin (content gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_006f943df6; -CREATE INDEX index_snippets_on_created_at ON snippets USING btree (created_at); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_02749b504c; -CREATE INDEX index_snippets_on_description_trigram ON snippets USING gin (description gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0287f5ba09; -CREATE INDEX index_snippets_on_file_name_trigram ON snippets USING gin (file_name gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_03aa30a758; -CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, created_at); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_055179c3ea; -CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_061fe00461; -CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_070cef72c3; -CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_08e3cfc564; -CREATE INDEX index_snippets_on_updated_at ON snippets USING btree (updated_at); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_09af45dd6f; -CREATE INDEX index_snippets_on_visibility_level_and_secret ON snippets USING btree (visibility_level, secret); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0c153e2eae; -CREATE INDEX index_software_license_policies_on_software_license_id ON software_license_policies USING btree (software_license_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0ca85f3d71; -CREATE UNIQUE INDEX index_software_license_policies_unique_per_project ON software_license_policies USING btree (project_id, software_license_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0d837a5dda; -CREATE INDEX index_software_licenses_on_spdx_identifier ON software_licenses USING btree (spdx_identifier); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0f28a65451; -CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses USING btree (name); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_10588dbff0; -CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_107e123e17; -CREATE INDEX index_sop_configurations_project_id_policy_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id, project_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1230a7a402; -CREATE INDEX index_sop_schedules_on_sop_configuration_id ON security_orchestration_policy_rule_schedules USING btree (security_orchestration_policy_configuration_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_142c4e7ea4; -CREATE INDEX index_sop_schedules_on_user_id ON security_orchestration_policy_rule_schedules USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_14e4fa1d7d; -CREATE INDEX index_spam_logs_on_user_id ON spam_logs USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_14f3645821; -CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_16627b455e; -CREATE INDEX index_sprints_on_description_trigram ON sprints USING gin (description gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_1a0388713a; -CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1a349ed064; -CREATE INDEX index_sprints_on_group_id ON sprints USING btree (group_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1af932a3c7; -CREATE UNIQUE INDEX index_sprints_on_iterations_cadence_id_and_title ON sprints USING btree (iterations_cadence_id, title); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1b0ea30bdb; -CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f6c3faabe; -CREATE UNIQUE INDEX index_sprints_on_project_id_and_title ON sprints USING btree (project_id, title) WHERE (project_id IS NOT NULL); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f8af04ed1; -CREATE INDEX index_sprints_on_title ON sprints USING btree (title); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_201c5ddbe9; -CREATE INDEX index_sprints_on_title_trigram ON sprints USING gin (title gin_trgm_ops); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_20353089e0; -CREATE INDEX index_status_check_responses_on_external_approval_rule_id ON status_check_responses USING btree (external_approval_rule_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_206349925b; -CREATE INDEX index_status_check_responses_on_external_status_check_id ON status_check_responses USING btree (external_status_check_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21db459e34; -CREATE INDEX index_status_check_responses_on_merge_request_id ON status_check_responses USING btree (merge_request_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21e262390a; -CREATE UNIQUE INDEX index_status_page_published_incidents_on_issue_id ON status_page_published_incidents USING btree (issue_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2208bd7d7f; -CREATE INDEX index_status_page_settings_on_project_id ON status_page_settings USING btree (project_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_223592b4a1; -CREATE INDEX index_subscriptions_on_project_id ON subscriptions USING btree (project_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_22acc9ab11; -CREATE UNIQUE INDEX index_subscriptions_on_subscribable_and_user_id_and_project_id ON subscriptions USING btree (subscribable_id, subscribable_type, user_id, project_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_22ed8f01dd; -CREATE INDEX index_successful_deployments_on_cluster_id_and_environment_id ON deployments USING btree (cluster_id, environment_id) WHERE (status = 2); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_234d38a657; -CREATE INDEX index_suggestions_on_note_id ON suggestions USING btree (note_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_23783dc748; -CREATE UNIQUE INDEX index_suggestions_on_note_id_and_relative_order ON suggestions USING btree (note_id, relative_order); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_241e9a574c; -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); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_24ac321751; -CREATE UNIQUE INDEX index_system_note_metadata_on_note_id ON system_note_metadata USING btree (note_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_25e2aaee9b; -CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2653e7eeb8; -CREATE INDEX index_taggings_on_taggable_id_and_taggable_type ON taggings USING btree (taggable_id, taggable_type); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2745f5a388; -CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON taggings USING btree (taggable_id, taggable_type, context); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_27759556bc; -CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_27d7ad78d8; -CREATE INDEX index_tags_on_name_trigram ON tags USING gin (name gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_281840d2d1; -CREATE INDEX index_term_agreements_on_term_id ON term_agreements USING btree (term_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_296f64df5c; -CREATE INDEX index_term_agreements_on_user_id ON term_agreements USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2ad4b4fdbc; -CREATE INDEX index_terraform_state_versions_failed_verification ON terraform_state_versions USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2b7c0a294e; -CREATE INDEX index_terraform_state_versions_needs_verification ON terraform_state_versions USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2c6422f668; -CREATE INDEX index_terraform_state_versions_on_ci_build_id ON terraform_state_versions USING btree (ci_build_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2dfcdbe81e; -CREATE INDEX index_terraform_state_versions_on_created_by_user_id ON terraform_state_versions USING btree (created_by_user_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2e1054b181; -CREATE UNIQUE INDEX index_terraform_state_versions_on_state_id_and_version ON terraform_state_versions USING btree (terraform_state_id, version); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2e6991d05b; -CREATE INDEX index_terraform_state_versions_on_verification_state ON terraform_state_versions USING btree (verification_state); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2f80c360c3; -CREATE INDEX index_terraform_state_versions_pending_verification ON terraform_state_versions USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2fc271c673; -CREATE INDEX index_terraform_states_on_file_store ON terraform_states USING btree (file_store); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2fcfd0dc70; -CREATE INDEX index_terraform_states_on_locked_by_user_id ON terraform_states USING btree (locked_by_user_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_3005c75335; -CREATE UNIQUE INDEX index_terraform_states_on_project_id_and_name ON terraform_states USING btree (project_id, name); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3206c1e6af; -CREATE UNIQUE INDEX index_terraform_states_on_uuid ON terraform_states USING btree (uuid); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3249505125; -CREATE INDEX index_timelogs_on_issue_id ON timelogs USING btree (issue_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_331eb67441; -CREATE INDEX index_timelogs_on_merge_request_id ON timelogs USING btree (merge_request_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3640194b77; -CREATE INDEX index_timelogs_on_note_id ON timelogs USING btree (note_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_372160a706; -CREATE INDEX index_timelogs_on_project_id_and_spent_at ON timelogs USING btree (project_id, spent_at); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_38a538234e; -CREATE INDEX index_timelogs_on_spent_at ON timelogs USING btree (spent_at) WHERE (spent_at IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_39625b8a41; -CREATE INDEX index_timelogs_on_user_id ON timelogs USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_399dc06649; -CREATE INDEX index_todos_on_author_id ON todos USING btree (author_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3a10b315c0; -CREATE INDEX index_todos_on_author_id_and_created_at ON todos USING btree (author_id, created_at); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3c2a3a6ac9; -CREATE INDEX index_todos_on_commit_id ON todos USING btree (commit_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3e6be332b7; -CREATE INDEX index_todos_on_group_id ON todos USING btree (group_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_41a1c3a4c6; -CREATE INDEX index_todos_on_note_id ON todos USING btree (note_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_435802dd01; -CREATE INDEX index_todos_on_project_id ON todos USING btree (project_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_436fa9ad5f; -CREATE INDEX index_todos_on_target_type_and_target_id ON todos USING btree (target_type, target_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_453a659cb6; -CREATE INDEX index_todos_on_user_id ON todos USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_46b989b294; -CREATE INDEX index_todos_on_user_id_and_id_done ON todos USING btree (user_id, id) WHERE ((state)::text = 'done'::text); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_47638677a3; -CREATE INDEX index_todos_on_user_id_and_id_pending ON todos USING btree (user_id, id) WHERE ((state)::text = 'pending'::text); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4810ac88f5; -CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_plaintext_token ON token_with_ivs USING btree (hashed_plaintext_token); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_491b4b749e; -CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_token ON token_with_ivs USING btree (hashed_token); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4a243772d7; -CREATE UNIQUE INDEX index_topics_on_name ON topics USING btree (name); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4b1793a4c4; -CREATE UNIQUE INDEX index_trending_projects_on_project_id ON trending_projects USING btree (project_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4b22560035; -CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING btree (key_handle); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4c2645eef2; -CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree (user_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4c9d14f978; -CREATE UNIQUE INDEX index_uniq_im_issuable_escalation_statuses_on_issue_id ON incident_management_issuable_escalation_statuses USING btree (issue_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4d04210a95; -CREATE UNIQUE INDEX index_unique_issue_metrics_issue_id ON issue_metrics USING btree (issue_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4d4f2f7de6; -CREATE UNIQUE INDEX index_unique_project_authorizations_on_project_id_user_id ON project_authorizations USING btree (project_id, user_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4db5aa5872; -CREATE INDEX index_unit_test_failures_failed_at ON ci_unit_test_failures USING btree (failed_at DESC); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4dead6f314; -CREATE UNIQUE INDEX index_unit_test_failures_unique_columns ON ci_unit_test_failures USING btree (unit_test_id, failed_at DESC, build_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4e6ce1c371; -CREATE UNIQUE INDEX index_upcoming_reconciliations_on_namespace_id ON upcoming_reconciliations USING btree (namespace_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4f2eb7a06b; -CREATE INDEX index_uploads_on_checksum ON uploads USING btree (checksum); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4f6fc34e57; -CREATE INDEX index_uploads_on_model_id_and_model_type ON uploads USING btree (model_id, model_type); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_50c09f6e04; -CREATE INDEX index_uploads_on_store ON uploads USING btree (store); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5111e3e7e7; -CREATE INDEX index_uploads_on_uploader_and_path ON uploads USING btree (uploader, path); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_52ea79bf8e; -CREATE INDEX index_user_agent_details_on_subject_id_and_subject_type ON user_agent_details USING btree (subject_id, subject_type); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_541cc045fc; -CREATE INDEX index_user_callouts_on_user_id ON user_callouts USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_551676e972; -CREATE UNIQUE INDEX index_user_callouts_on_user_id_and_feature_name ON user_callouts USING btree (user_id, feature_name); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_56281bfb73; -CREATE INDEX index_user_canonical_emails_on_canonical_email ON user_canonical_emails USING btree (canonical_email); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5660b1b38e; -CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id ON user_canonical_emails USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_59a8209ab6; -CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id_and_canonical_email ON user_canonical_emails USING btree (user_id, canonical_email); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_59ce40fcc4; -CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attributes USING btree (key, value); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5a5f39d824; -CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5b613b5fcf; -CREATE INDEX index_user_details_on_provisioned_by_group_id ON user_details USING btree (provisioned_by_group_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5b944f308d; -CREATE UNIQUE INDEX index_user_details_on_user_id ON user_details USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5bc2f32084; -CREATE INDEX index_user_group_callouts_on_group_id ON user_group_callouts USING btree (group_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5c4053b63d; -CREATE INDEX index_user_highest_roles_on_user_id_and_highest_access_level ON user_highest_roles USING btree (user_id, highest_access_level); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5db09170d4; -CREATE INDEX index_user_interacted_projects_on_user_id ON user_interacted_projects USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5ee060202f; -CREATE INDEX index_user_permission_export_uploads_on_user_id_and_status ON user_permission_export_uploads USING btree (user_id, status); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f24f6ead2; -CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f96b344e2; -CREATE UNIQUE INDEX index_user_preferences_on_user_id ON user_preferences USING btree (user_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fb1867c41; -CREATE INDEX index_user_statuses_on_clear_status_at_not_null ON user_statuses USING btree (clear_status_at) WHERE (clear_status_at IS NOT NULL); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fe1d00845; -CREATE INDEX index_user_statuses_on_user_id ON user_statuses USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_60e3480f23; -CREATE UNIQUE INDEX index_user_synced_attributes_metadata_on_user_id ON user_synced_attributes_metadata USING btree (user_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6137e27484; -CREATE INDEX index_users_on_accepted_term_id ON users USING btree (accepted_term_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_620fe77c99; -CREATE INDEX index_users_on_admin ON users USING btree (admin); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_625ed9e965; -CREATE UNIQUE INDEX index_users_on_confirmation_token ON users USING btree (confirmation_token); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_64e3a1dfa1; -CREATE INDEX index_users_on_created_at ON users USING btree (created_at); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_64eb4cf8bd; -CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6580ecb2db; -CREATE INDEX index_users_on_email_trigram ON users USING gin (email gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_682eba05f6; -CREATE INDEX index_users_on_feed_token ON users USING btree (feed_token); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_69bdcf213e; -CREATE INDEX index_users_on_group_view ON users USING btree (group_view); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6a39f6d5ac; -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])))); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6add8e74cf; -CREATE INDEX index_users_on_incoming_email_token ON users USING btree (incoming_email_token); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6b1ce61c8f; -CREATE INDEX index_users_on_managing_group_id ON users USING btree (managing_group_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6cfb391b86; -CREATE INDEX index_users_on_name ON users USING btree (name); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6e6c2e6a1d; -CREATE INDEX index_users_on_name_trigram ON users USING gin (name gin_trgm_ops); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6ea423bbd1; -CREATE INDEX index_users_on_public_email ON users USING btree (public_email) WHERE ((public_email)::text <> ''::text); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6ec4c4afd4; -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); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6f4e0abe54; -CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6fa47e1334; -CREATE INDEX index_users_on_state ON users USING btree (state); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_70c657954b; -CREATE INDEX index_users_on_state_and_user_type ON users USING btree (state, user_type); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_71c2b26944; -CREATE UNIQUE INDEX index_users_on_static_object_token ON users USING btree (static_object_token); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_72027c157f; -CREATE INDEX index_users_on_unconfirmed_email ON users USING btree (unconfirmed_email) WHERE (unconfirmed_email IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_739845f617; -CREATE UNIQUE INDEX index_users_on_unlock_token ON users USING btree (unlock_token); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_74addd1240; -CREATE INDEX index_users_on_user_type ON users USING btree (user_type); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_75dc81d1d7; -CREATE INDEX index_users_on_username ON users USING btree (username); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_765b0cd8db; -CREATE INDEX index_users_on_username_trigram ON users USING gin (username gin_trgm_ops); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_77096a1dc6; -CREATE INDEX index_users_ops_dashboard_projects_on_project_id ON users_ops_dashboard_projects USING btree (project_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_77c6293242; -CREATE UNIQUE INDEX index_users_ops_dashboard_projects_on_user_id_and_project_id ON users_ops_dashboard_projects USING btree (user_id, project_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7b7c85eceb; -CREATE INDEX index_users_require_two_factor_authentication_from_group_false ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = false); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7da2307d2e; -CREATE INDEX index_users_security_dashboard_projects_on_user_id ON users_security_dashboard_projects USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7ead2300ca; -CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USING btree (project_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7ecb5b68b4; -CREATE UNIQUE INDEX index_users_star_projects_on_user_id_and_project_id ON users_star_projects USING btree (user_id, project_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_807671c4be; -CREATE UNIQUE INDEX index_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_807fa83fc0; -CREATE INDEX index_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_80c65daf20; -CREATE INDEX index_vulnerabilities_on_confirmed_by_id ON vulnerabilities USING btree (confirmed_by_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_81b9cf594f; -CREATE INDEX index_vulnerabilities_on_dismissed_by_id ON vulnerabilities USING btree (dismissed_by_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_82c675952c; -CREATE INDEX index_vulnerabilities_on_due_date_sourcing_milestone_id ON vulnerabilities USING btree (due_date_sourcing_milestone_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_83c5049b3e; -CREATE INDEX index_vulnerabilities_on_epic_id ON vulnerabilities USING btree (epic_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_83edf231b8; -CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING btree (last_edited_by_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_844abd2888; -CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8464227c80; -CREATE INDEX index_vulnerabilities_on_project_id_and_state_and_severity ON vulnerabilities USING btree (project_id, state, severity); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8685d7c69c; -CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_8688b40056; -CREATE INDEX index_vulnerabilities_on_start_date_sourcing_milestone_id ON vulnerabilities USING btree (start_date_sourcing_milestone_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_87d40fb9f9; -CREATE INDEX index_vulnerabilities_on_state_case_id ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state), id DESC); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_88b40d6740; -CREATE INDEX index_vulnerabilities_on_state_case_id_desc ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state) DESC, id DESC); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_89c79afe5c; -CREATE INDEX index_vulnerabilities_on_updated_by_id ON vulnerabilities USING btree (updated_by_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8a0fc3de4f; -CREATE INDEX index_vulnerability_exports_on_author_id ON vulnerability_exports USING btree (author_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8b9f9a19a4; -CREATE INDEX index_vulnerability_exports_on_file_store ON vulnerability_exports USING btree (file_store); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8fb48e72ce; -CREATE INDEX index_vulnerability_exports_on_group_id_not_null ON vulnerability_exports USING btree (group_id) WHERE (group_id IS NOT NULL); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_9201b952a0; -CREATE INDEX index_vulnerability_exports_on_project_id_not_null ON vulnerability_exports USING btree (project_id) WHERE (project_id IS NOT NULL); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_92c09e352b; -CREATE INDEX index_vulnerability_external_issue_links_on_author_id ON vulnerability_external_issue_links USING btree (author_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9490e0e0b7; -CREATE INDEX index_vulnerability_external_issue_links_on_vulnerability_id ON vulnerability_external_issue_links USING btree (vulnerability_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_95a353f50b; -CREATE INDEX index_vulnerability_feedback_on_author_id ON vulnerability_feedback USING btree (author_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_971af9481e; -CREATE INDEX index_vulnerability_feedback_on_comment_author_id ON vulnerability_feedback USING btree (comment_author_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9955b1dc59; -CREATE INDEX index_vulnerability_feedback_on_issue_id ON vulnerability_feedback USING btree (issue_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_9b8e89ae41; -CREATE INDEX index_vulnerability_feedback_on_issue_id_not_null ON vulnerability_feedback USING btree (id) WHERE (issue_id IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9ee83b068b; -CREATE INDEX index_vulnerability_feedback_on_merge_request_id ON vulnerability_feedback USING btree (merge_request_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a1a9dc36c1; -CREATE INDEX index_vulnerability_feedback_on_pipeline_id ON vulnerability_feedback USING btree (pipeline_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a2d9f185a5; -CREATE INDEX index_vulnerability_finding_signatures_on_finding_id ON vulnerability_finding_signatures USING btree (finding_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a3feed3097; -CREATE INDEX index_vulnerability_findings_remediations_on_remediation_id ON vulnerability_findings_remediations USING btree (vulnerability_remediation_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a6999c65c9; -CREATE UNIQUE INDEX index_vulnerability_findings_remediations_on_unique_keys ON vulnerability_findings_remediations USING btree (vulnerability_occurrence_id, vulnerability_remediation_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a6c68d16b2; -CREATE UNIQUE INDEX index_vulnerability_flags_on_unique_columns ON vulnerability_flags USING btree (vulnerability_occurrence_id, flag_type, origin); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_a8276a450f; -CREATE INDEX index_vulnerability_flags_on_vulnerability_occurrence_id ON vulnerability_flags USING btree (vulnerability_occurrence_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a88f20fc98; -CREATE INDEX index_vulnerability_historical_statistics_on_date_and_id ON vulnerability_historical_statistics USING btree (date, id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a9424aa392; -CREATE UNIQUE INDEX index_vulnerability_identifiers_on_project_id_and_fingerprint ON vulnerability_identifiers USING btree (project_id, fingerprint); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a99cee1904; -CREATE INDEX index_vulnerability_issue_links_on_issue_id ON vulnerability_issue_links USING btree (issue_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a9deff2159; -CREATE INDEX index_vulnerability_occurrence_identifiers_on_identifier_id ON vulnerability_occurrence_identifiers USING btree (identifier_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aabc184267; -CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON vulnerability_occurrence_identifiers USING btree (occurrence_id, identifier_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ab22231a16; -CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON vulnerability_occurrence_pipelines USING btree (pipeline_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_abbdf80ab1; -CREATE INDEX index_vulnerability_occurrences_deduplication ON vulnerability_occurrences USING btree (project_id, report_type, project_fingerprint); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_adc159c3fe; -CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text)); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aed7f7b10c; -CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON vulnerability_occurrences USING btree (primary_identifier_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_aee84adb5b; -CREATE INDEX index_vulnerability_occurrences_on_project_fingerprint ON vulnerability_occurrences USING btree (project_fingerprint); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b1dda405af; -CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON vulnerability_occurrences USING btree (scanner_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b607012614; -CREATE UNIQUE INDEX index_vulnerability_occurrences_on_unique_keys ON vulnerability_occurrences USING btree (project_id, primary_identifier_id, location_fingerprint, scanner_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b7f21460bb; -CREATE UNIQUE INDEX index_vulnerability_occurrences_on_uuid ON vulnerability_occurrences USING btree (uuid); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_b83fe1306b; -CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerability_occurrences USING btree (vulnerability_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bc189e47ab; -CREATE UNIQUE INDEX index_vulnerability_remediations_on_project_id_and_checksum ON vulnerability_remediations USING btree (project_id, checksum); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_bca83177ef; -CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON vulnerability_scanners USING btree (project_id, external_id); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bedd7e160b; -CREATE INDEX index_vulnerability_statistics_on_latest_pipeline_id ON vulnerability_statistics USING btree (latest_pipeline_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bee2b94a80; -CREATE INDEX index_vulnerability_statistics_on_letter_grade ON vulnerability_statistics USING btree (letter_grade); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c08e669dfa; -CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON vulnerability_statistics USING btree (project_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c09bb66559; -CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c119f5b92e; -CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c17dae3605; -CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c1cdd90d0d; -CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c2b951bf20; -CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c42b2e7eae; -CREATE INDEX index_web_hooks_on_project_id_recent_failures ON web_hooks USING btree (project_id, recent_failures); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c435d904ce; -CREATE INDEX index_web_hooks_on_service_id ON web_hooks USING btree (service_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c473921734; -CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c546bb0736; -CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c59cde6209; -CREATE INDEX index_webauthn_registrations_on_u2f_registration_id ON webauthn_registrations USING btree (u2f_registration_id) WHERE (u2f_registration_id IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c66758baa7; -CREATE INDEX index_webauthn_registrations_on_user_id ON webauthn_registrations USING btree (user_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c6ea8a0e26; -CREATE INDEX index_wiki_page_meta_on_project_id ON wiki_page_meta USING btree (project_id); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c8c4219c0a; -CREATE UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON wiki_page_slugs USING btree (slug, wiki_page_meta_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c971e6c5ce; -CREATE INDEX index_wiki_page_slugs_on_wiki_page_meta_id ON wiki_page_slugs USING btree (wiki_page_meta_id); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c9b14a3d9f; -CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cbb61ea269; -CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_cc0ba6343b; -CREATE INDEX index_x509_commit_signatures_on_commit_sha ON x509_commit_signatures USING btree (commit_sha); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_cd2b2939a4; -CREATE INDEX index_x509_commit_signatures_on_project_id ON x509_commit_signatures USING btree (project_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cda41e106e; -CREATE INDEX index_x509_commit_signatures_on_x509_certificate_id ON x509_commit_signatures USING btree (x509_certificate_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cfa4237c83; -CREATE INDEX index_x509_issuers_on_subject_key_identifier ON x509_issuers USING btree (subject_key_identifier); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_d01ea0126a; -CREATE INDEX index_zentao_tracker_data_on_integration_id ON zentao_tracker_data USING btree (integration_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d0d285c264; -CREATE INDEX index_zoom_meetings_on_issue_id ON zoom_meetings USING btree (issue_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d27b4c84e7; -CREATE UNIQUE INDEX index_zoom_meetings_on_issue_id_and_issue_status ON zoom_meetings USING btree (issue_id, issue_status) WHERE (issue_status = 1); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d2fe918e83; -CREATE INDEX index_zoom_meetings_on_issue_status ON zoom_meetings USING btree (issue_status); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d35c969634; -CREATE INDEX index_zoom_meetings_on_project_id ON zoom_meetings USING btree (project_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d6047ee813; -CREATE INDEX issue_id_issues_prometheus_alert_events_index ON issues_prometheus_alert_events USING btree (prometheus_alert_event_id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d69c2485f4; -CREATE INDEX issue_id_issues_self_managed_rometheus_alert_events_index ON issues_self_managed_prometheus_alert_events USING btree (self_managed_prometheus_alert_event_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d8fa9793ad; -CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_and_note_id_index ON issue_user_mentions USING btree (issue_id, note_id); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d9384b768d; -CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_index ON issue_user_mentions USING btree (issue_id) WHERE (note_id IS NULL); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_dc571ba649; -CREATE UNIQUE INDEX kubernetes_namespaces_cluster_and_namespace ON clusters_kubernetes_namespaces USING btree (cluster_id, namespace); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_df62a8c50e; -CREATE INDEX merge_request_mentions_temp_index ON merge_requests USING btree (id) WHERE ((description ~~ '%@%'::text) OR ((title)::text ~~ '%@%'::text)); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e1a4f994d8; -CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_and_note_id_index ON merge_request_user_mentions USING btree (merge_request_id, note_id); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e3d1fd5b19; -CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_index ON merge_request_user_mentions USING btree (merge_request_id) WHERE (note_id IS NULL); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e3d6234929; -CREATE INDEX merge_requests_state_id_temp_index ON merge_requests USING btree (id) WHERE (state_id = ANY (ARRAY[2, 3])); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e54adf9acb; -CREATE INDEX note_mentions_temp_index ON notes USING btree (id, noteable_type) WHERE (note ~~ '%@%'::text); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e6405afea0; -CREATE UNIQUE INDEX one_canonical_wiki_page_slug_per_metadata ON wiki_page_slugs USING btree (wiki_page_meta_id) WHERE (canonical = true); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e64588e276; -CREATE INDEX package_name_index ON packages_packages USING btree (name); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e716b8ac3f; -CREATE INDEX packages_packages_failed_verification ON packages_package_files USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e73bc5ba6a; -CREATE INDEX packages_packages_needs_verification ON packages_package_files USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e8f3a327b2; -CREATE INDEX packages_packages_pending_verification ON packages_package_files USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ea0c2d3361; -CREATE UNIQUE INDEX partial_index_bulk_import_exports_on_group_id_and_relation ON bulk_import_exports USING btree (group_id, relation) WHERE (group_id IS NOT NULL); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_eb558957f0; -CREATE UNIQUE INDEX partial_index_bulk_import_exports_on_project_id_and_relation ON bulk_import_exports USING btree (project_id, relation) WHERE (project_id IS NOT NULL); +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ec25d494e6; -CREATE INDEX partial_index_ci_builds_on_scheduled_at_with_scheduled_jobs ON ci_builds USING btree (scheduled_at) WHERE ((scheduled_at IS NOT NULL) AND ((type)::text = 'Ci::Build'::text) AND ((status)::text = 'scheduled'::text)); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ed094a4f13; -CREATE INDEX partial_index_deployments_for_legacy_successful_deployments ON deployments USING btree (id) WHERE ((finished_at IS NULL) AND (status = 2)); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ee4c549a2d; -CREATE INDEX partial_index_deployments_for_project_id_and_tag ON deployments USING btree (project_id) WHERE (tag IS TRUE); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ef6a48bd29; -CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_and_note_id_index ON snippet_user_mentions USING btree (snippet_id, note_id); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ef7be2ae94; -CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_mentions USING btree (snippet_id) WHERE (note_id IS NULL); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f0cdd09a5e; -CREATE UNIQUE INDEX taggings_idx ON taggings USING btree (tag_id, taggable_id, taggable_type, context, tagger_id, tagger_type); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f112fae8ac; -CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f1c3d14cdc; -CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occurrences USING btree (project_id, report_type, location_fingerprint, primary_identifier_id, id); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f256d3f6a1; -CREATE INDEX tmp_idx_on_namespaces_delayed_project_removal ON namespaces USING btree (id) WHERE (delayed_project_removal = true); +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_f2848acfc7; -CREATE INDEX tmp_index_ci_builds_lock_version ON ci_builds USING btree (id) WHERE (lock_version IS NULL); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f3d7d86e09; -CREATE INDEX tmp_index_ci_pipelines_lock_version ON ci_pipelines USING btree (id) WHERE (lock_version IS NULL); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f47327ec1f; -CREATE INDEX tmp_index_ci_stages_lock_version ON ci_stages USING btree (id_convert_to_bigint) WHERE (lock_version IS NULL); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f6b0d458a3; -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[])); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f705dc8541; -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[])); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f76e8a5304; -CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f86acdc2ff; -CREATE INDEX tmp_index_taggings_on_id_where_taggable_type_project ON taggings USING btree (id) WHERE ((taggable_type)::text = 'Project'::text); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f878aab8e3; -CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f902c261ce; -CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name); +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbccc855cf; -CREATE UNIQUE INDEX uniq_pkgs_deb_proj_architectures_on_distribution_id_and_name ON packages_debian_project_architectures USING btree (distribution_id, name); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbf2d3310b; -CREATE UNIQUE INDEX uniq_pkgs_deb_proj_components_on_distribution_id_and_name ON packages_debian_project_components USING btree (distribution_id, name); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fccbe45c32; -CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_codename ON packages_debian_group_distributions USING btree (group_id, codename); +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_fee429223e; -CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_suite ON packages_debian_group_distributions USING btree (group_id, suite); +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff00c038cc; -CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_codename ON packages_debian_project_distributions USING btree (project_id, codename); +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ff39be5400; -CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_suite ON packages_debian_project_distributions USING btree (project_id, suite); +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff8741d8d7; -CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id); +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_issue_id_idx; -CREATE INDEX user_follow_users_followee_id_idx ON user_follow_users USING btree (followee_id); +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_pkey; -CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_search_vector_idx; -CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_issue_id_idx; -CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name))); +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202212_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202301_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202302_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202303_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202304_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_pkey; -ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_created_at_author_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_search_vector_idx; -ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_entity_id_entity_type_id_author_id_crea_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_issue_id_idx; -ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_pkey; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_search_vector_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_pkey; -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 index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_search_vector_idx; -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 index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_issue_id_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_pkey; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_search_vector_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_issue_id_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_pkey; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_search_vector_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_issue_id_idx; -ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_search_vector_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_alert_id_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_issue_id_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx1; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_pkey; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx2; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_search_vector_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx3; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_issue_id_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx4; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_pkey; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx5; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_search_vector_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx6; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_pkey; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx2; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_search_vector_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx3; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_issue_id_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx4; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_pkey; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx5; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_search_vector_idx; -ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx6; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_pkey; -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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_search_vector_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_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_pkey; -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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_search_vector_idx; -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_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_pkey; -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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_search_vector_idx; -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_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_pkey; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_search_vector_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_pkey; -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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_search_vector_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_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_issue_id_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_pkey; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_search_vector_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_issue_id_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_pkey; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_search_vector_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_issue_id_idx; -ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_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_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_search_vector_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_issue_id_idx; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_issue_id_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx1; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_pkey; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx2; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_search_vector_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx3; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_issue_id_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx4; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_pkey; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx5; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_search_vector_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx6; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_pkey; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx2; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_search_vector_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx3; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_issue_id_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx4; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_pkey; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx5; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_search_vector_idx; -ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx6; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_pkey; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_1554dc6f11; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_search_vector_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_719c6187cb; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_80bf138a51; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_962081978f; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_search_vector_idx; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_eecfac613f; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_fdb8d5eeea; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_pkey; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_000000_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_search_vector_idx; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202212_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_issue_id_idx; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202301_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_pkey; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202302_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_search_vector_idx; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202303_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_issue_id_idx; -ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202304_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_pkey; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_000000_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202212_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_issue_id_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202301_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202302_web_hook_id_idx; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202303_web_hook_id_idx; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202304_web_hook_id_idx; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_web_hook_id_idx; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_issue_id_idx; -ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_web_hook_id_idx; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_pkey; -ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_created_at_web_hook_id_idx; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_search_vector_idx; -ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_issue_id_idx; -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 issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_pkey; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_pkey; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28_pkey; +ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_search_vector_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29_pkey; +ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_issue_id_idx; -ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30_pkey; +ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_pkey; -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_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; @@ -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 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_490d204c00b3 BEFORE INSERT OR UPDATE ON ci_stages FOR EACH ROW EXECUTE FUNCTION trigger_490d204c00b3(); +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_542d6c2ad72e BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_542d6c2ad72e(); +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_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_69523443cc10(); +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_77f5e1d20482 BEFORE INSERT OR UPDATE ON deployments FOR EACH ROW EXECUTE FUNCTION trigger_77f5e1d20482(); +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_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_8485e97c00e3(); +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_8487d4de3e7b BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_8487d4de3e7b(); +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_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6(); +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_aebe8b822ad3 BEFORE INSERT OR UPDATE ON taggings FOR EACH ROW EXECUTE FUNCTION trigger_aebe8b822ad3(); - -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; -- cgit v1.2.3