Refactor Schema for Deprecated gitlab_main
Tables
Description:
This issue is to track the decision-making process for reclassifying tables from the now-deprecated gitlab_main
schema. As part of our work on the Cells architecture, we need to assign each of these tables to a more appropriate, specific schema.
The goal is to analyze the tables listed below and determine their correct schema based on the new definitions.
Schema Definitions
For context, here are the current schema definitions that we should use for classification:
-
gitlab_main_cell
: To be renamed togitlab_main_org
. Use for all tables in themain:
database that are for an Organization. For example,projects
andgroups
. -
gitlab_main_user
: Schema for all User-related tables that are not organizational level (e.g.,users
,emails
). Tables on this schema must strictly belong to a user. -
gitlab_main_clusterwide
(deprecated): All tables in themain:
database where all rows, or a subset of rows, need to be present across the cluster. For example,plans
. These tables will be stored locally in each cell for now. -
gitlab_main_cell_local
: For tables in themain:
database that are related to features distinct for each cell (e.g.,zoekt_nodes
). These tables should not have foreign key references to/from organization tables. -
gitlab_main_cell_setting
: All tables in themain:
database related to cell settings (e.g.,application_settings
). These tables should not have foreign key references to/from organization tables.
Tables for Reclassification
The following tables, all currently in gitlab_main
and introduced before milestone 16.6, require a new schema assignment:
"abuse_events",
"abuse_report_events",
"abuse_report_user_mentions",
"abuse_reports",
"abuse_trust_scores",
"audit_events",
"audit_events_instance_external_audit_event_destinations",
"audit_events_instance_google_cloud_logging_configurations",
"audit_events_streaming_instance_event_type_filters",
"authentication_events",
"award_emoji",
"cluster_platforms_kubernetes",
"cluster_providers_aws",
"cluster_providers_gcp",
"clusters",
"clusters_integration_prometheus",
"clusters_kubernetes_namespaces",
"content_blocked_states",
"deploy_tokens",
"dingtalk_tracker_data",
"gpg_key_subkeys",
"gpg_keys",
"historical_data",
"identities",
"instance_audit_events_streaming_headers",
"issue_tracker_data",
"jira_connect_installations",
"jira_tracker_data",
"keys",
"label_links",
"list_user_preferences",
"oauth_applications",
"plans",
"programming_languages",
"resource_iteration_events",
"resource_label_events",
"resource_state_events",
"security_training_providers",
"sent_notifications",
"slack_api_scopes",
"slack_integrations",
"slack_integrations_scopes",
"spam_logs",
"subscription_add_ons",
"subscriptions",
"system_note_metadata",
"timelogs",
"user_agent_details",
"user_permission_export_uploads",
"users_statistics",
"verification_codes",
"work_item_hierarchy_restrictions",
"work_item_related_link_restrictions",
"work_item_types",
"work_item_widget_definitions",
"x509_certificates",
"x509_issuers",
"zentao_tracker_data"
Tables Excluded (For Now)
The following tables will not be considered for migration at this time, as moving them would break existing specs.
"abuse_report_assignees",
"abuse_report_label_links",
"abuse_report_labels",
"abuse_report_notes",
"abuse_report_uploads",
"admin_roles",
"ai_feature_settings",
"ai_self_hosted_models",
"ai_testing_terms_acceptances",
"audit_events_instance_amazon_s3_configurations",
"audit_events_instance_external_streaming_destinations",
"audit_events_instance_streaming_event_type_filters",
"cloud_connector_keys",
"instance_audit_events",
"instance_integrations",
"ldap_admin_role_links",
"user_audit_events",
"User_permission_export_upload_uploads"
✅ Action Items
- Discuss and Decide: For each table in the "Tables for Reclassification" list, we must decide on its new schema based on the definitions provided.
- Document Decisions: Create a table or checklist in this issue to track the final decision and reasoning for each table.
- Create Follow-up Issues: Once decisions are finalized, create the necessary merge request to request review from the owning team.
Edited by 🤖 GitLab Bot 🤖