sequelize / sequelize-auto

Automatically generate bare sequelize models from your database.
2.9k stars 527 forks source link

Fix foreign key detection when the target table is in another schema #627

Open mat813 opened 1 year ago

mat813 commented 1 year ago

constraint_schema ends up being the same schema than the source_schema, which is not good, as the target_schema of the target_table can be different, so actually use the target table schema.

mat813 commented 1 year ago

poke @steveschmitt

mat813 commented 1 year ago

Is there anything I need to do to make it go further ?

ephys commented 1 year ago

The issue on our end is that we don't currently have the manpower to work on this project. steveschmitt seems to have been inactive since december 2021 and he was the main maintainer of sequelize-auto

I'd love to get this project moving again but I'm already focused on the new version of Sequelize Core. The best thing that could happen to this project would be to find a new maintainer that is willing to take care of sequelize-auto

I'm trying to find the time to overhaul the test suite so we can add regression tests for things like this, but the codebase is very 2013. If this scenario were tested, it'd be much easier for us to merge it

mat813 commented 1 year ago

Well, I would volunteer myself to maintain this, but, well, I am not sure what the workload would be, and if I have enough brain cycles to do it. (And yes, the codebase for this is old) I will try to figure out a way to test this scenario.