Hi.
I'm using sequelize-auto to generate schemas from a prebuilt database. I'm running into an issue where I need to run some update functions to update a foreign key however since sequelize-auto sets the foreign key as "primary:true" sequelize ignores it.
Below is the generated foreign key and the primary property being set to true.
Because of the above, I cannot update the column unless I change the primary property to false like below
Is this expected behavior for sequelize-auto to set foreign keys as primary in the schema?
Is this configurable anywhere? As I don't want to update every model which has foreign keys to be primary: false.
Hi. I'm using sequelize-auto to generate schemas from a prebuilt database. I'm running into an issue where I need to run some update functions to update a foreign key however since sequelize-auto sets the foreign key as "primary:true" sequelize ignores it.
Below is the generated foreign key and the primary property being set to true.
Because of the above, I cannot update the column unless I change the primary property to false like below
Is this expected behavior for sequelize-auto to set foreign keys as primary in the schema? Is this configurable anywhere? As I don't want to update every model which has foreign keys to be primary: false.
Advice and workarounds would be appreciated.