You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce or a small repository showing the problem:
When using MySQL/MariaDB if you have an entity with a foreign key and it is created in two different schemas (i.e. a development schema and a staging schema) on the same server, the information loaded from the schema is non-deterministic, as it can come from either schema, due to a missing clause in the query used to load the data from MySQL's information schema.
A simple way to test this is:
Create an entity with a ManyToOne relation to another entity
Generate the migration and synchronize to the database
Change the schema for the entity
Change the ManyToOne relation onUpdate and/or onDelete values
Generate the migration for the new schema
Apply the migration
Generate a new migration. Due to the wrong information loaded the onUpdate or onDelete values might come from the wrong schema and generate an unnecessary foreign key recreation
The text was updated successfully, but these errors were encountered:
Fixes an edge case where the wrong foreign key
would be loaded when multiple databases exist
with foreign keys that have the same name.
Fixestypeorm#6168
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[x]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[x]
0.2.5
Steps to reproduce or a small repository showing the problem:
When using MySQL/MariaDB if you have an entity with a foreign key and it is created in two different schemas (i.e. a development schema and a staging schema) on the same server, the information loaded from the schema is non-deterministic, as it can come from either schema, due to a missing clause in the query used to load the data from MySQL's information schema.
A simple way to test this is:
ManyToOne
relation to another entityManyToOne
relationonUpdate
and/oronDelete
valuesonUpdate
oronDelete
values might come from the wrong schema and generate an unnecessary foreign key recreationThe text was updated successfully, but these errors were encountered: