Skip to content
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

fix: EXPOSED-588 Foreign key error when table has dot in its name #2276

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

joc-a
Copy link
Collaborator

@joc-a joc-a commented Oct 15, 2024

Description

Detailed description:

  • What:
    Modified the way a foreign key name is constructed.
  • Why:
    When creating a child table that has a dot in its name, the foreign key name created by Exposed would include that dot, which causes an error.
  • How:
    The fix is to replace the dot in the table name with an underscore when constructing the foreign key name.

Type of Change

Please mark the relevant options with an "X":

  • Bug fix
  • New feature
  • Documentation update

Updates/remove existing public API methods:

  • Is breaking change

Affected databases:

  • MariaDB
  • Mysql5
  • Mysql8
  • Oracle
  • Postgres
  • SqlServer
  • H2
  • SQLite

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

Related Issues

When creating a child table that has a dot in its name, the foreign key name created by Exposed would include that dot, which causes an error. The fix is to replace the dot with an underscore when constructing the foreign key name.
@joc-a joc-a marked this pull request as ready for review October 15, 2024 14:04
@joc-a joc-a requested a review from obabichevjb October 15, 2024 14:04
@joc-a joc-a merged commit 7bd661e into main Oct 16, 2024
5 checks passed
@joc-a joc-a deleted the joc/exposed-588 branch October 16, 2024 09:17
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.

2 participants