medusa
medusa copied to clipboard
Generate Migration TypeORM
Bug report
Describe the bug
Generating a migration with medusa-extender does not take into account the extended Entities due to a possible issue with Typeorm drivers.
System information
Medusa version (including plugins): 1.3.5
Node.js version: v16.13.0
Database: PostgreSQL
Operating system: MacOS
Browser (if relevant):
Steps to reproduce the behavior
All reproducible steps are below: https://github.com/adrien2p/medusa-extender/issues/113
Expected behavior
Extended entities should still allow for generated migrations with Typeorm. The ask is to migrate TypeORM from v2 to v3 in order to eventually attempt to find a solution.
Additional context
Most of the context is in an issue within medusa-extender: https://github.com/adrien2p/medusa-extender/issues/113
The main goal of this issue to bring to attention the possible need for migrating TypeORM 😇
Thanks for reporting this one in @juanzgc! We started looking into upgrading Typeorm last week, so hopefully, we'll be able to make it happen in the near future.
@olivermrbl i ve started my DD about it, hopefully it could be possible in few weeks 👍
But even without specifying extended entities but just the medusa one, the output is the same with the same weird queries.
The problem comes from the postgres driver called by the rdbms. When executing the actions in order, for each of them there is a check to know if something changed of not. The result of that check does not make sense and it is a known issue. Let hope that the latests version bring improvements on that part
A solution has been provided in the extender repo, could I get you to give it a try please?
Unfortunately, that solution doesn't seem to work :(