Skip to content

fix: include schema name in table name #2510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

olavloite
Copy link
Contributor

Spanner databases contain both system schemas and a user schema. The current Spring Data Spanner implementation assumes that all table names in a database are unique, but this is not true if a user creates a table that is equal to the name of a system table in one of the system schemas.

Additionally, Spanner could introduce support for user-defined named schemas in the future. This would increase the probability that a single database contains multiple tables with the same name, but in different schemas.

This change fixes any problems that might occur if a database contains multiple tables with the same name in different schemas. The change does not attempt to implement full support for using multiple different schemas with Spring Cloud Data Spanner.

Spanner databases contain both system schemas and a user schema. The
current Spring Data Spanner implementation assumes that all table names
in a database are unique, but this is not true if a user creates a table
that is equal to the name of a system table in one of the system
schemas.

Additionally, Spanner could introduce support for user-defined named
schemas in the future. This would increase the probability that a single
database contains multiple tables with the same name, but in different
schemas.

This change fixes any problems that might occur if a database contains
multiple tables with the same name in different schemas. The change does
not attempt to implement full support for using multiple different
schemas with Spring Cloud Data Spanner.
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
83.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@olavloite olavloite marked this pull request as ready for review January 11, 2024 12:32
@olavloite olavloite requested a review from a team as a code owner January 11, 2024 12:32
@meltsufin meltsufin merged commit 5dfe226 into main Jan 11, 2024
@meltsufin meltsufin deleted the spanner-named-schemas branch January 11, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants