Skip to content

Gitlab::Database::GitlabSchema.table_schema to return nil

Manoj M J requested to merge mmj-db-undefined into master

What does this MR do and why?

For #388925 (closed)

We require a gitlab_schema to be set for any created table, but Gitlab::Database::GitlabSchema.table_schema continue to return undefined_table_name as the schema name for any table for which it can't find a schema.

We need to change this behaviour to return nil when Gitlab::Database::GitlabSchema.table_schema can't find an associated gitlab schema.

Also, Gitlab::Database::GitlabSchema.table_schemas has been turned in Gitlab::Database::GitlabSchema.table_schemas!, so that it raises an error when it cannot find schemas for a table.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #388925 (closed)

Edited by Manoj M J

Merge request reports