Repository navigation
fix: handle schema and table name correctly in generated columns in metadata table - #12423
Conversation
commit: |
5f0a655 to
bebea45
Compare
e7ceca4 to
bc3001b
Compare
|
I already worked on this #11620 |
@BenraouaneSoufiane, I looked at your PR, you are working around the ALTER instead of DROP+ADD. |
Code Review by Qodo
1.
|
smith-xyz
left a comment
There was a problem hiding this comment.
Nice fix just one concern with the tests. The PR description mentions users upgrading may see false migrations. Would it be worth adding a note in the changelog or migration docs so users know this is expected and one-time?
smith-xyz
left a comment
There was a problem hiding this comment.
I think this lgmt! sorry meant to swap this to approve
|
This repository was recently restructured into a pnpm workspace, and the If your branch has diverged enough that a full rebase isn't worth it, Sorry for the disruption, and thanks for your patience. |
…th only table name for generated columns metadata queries
…ing generated columns
c815b96 to
f1dc7f6
Compare
beb7ede to
bb9ad77
Compare
bb9ad77 to
228d1cf
Compare
Closes #11589
Description of change
public), the generated columns metadata was stored incorrectly in the metadata table. It was storingpublicinschemacolumn of metadata table even when a user-defined schema was provided during@Entity({ schema: ... })or inDataSourceOptions.database.schema.tablenamewas being stored intablecolumn of metadata table, and duringloadTables, querying withtable: tablenamewas causing a mismatch and false schema migrations.tableornamecolumn of the metadata table.columnsSqlinSqlServerQueryRunner.loadTablesto load correctis_persistedanddefinitionfor@Entity({ database: '...', schema: '...' }).Users upgrading with this fix might generate migrations, as it now attempts to query against a plain table name rather than a schema- and database-qualified one.
Pull-Request Checklist
masterbranchFixes #11589tests/**.test.ts)docs/docs/**.md) (N/A)