Sequelize creating old tables even when they are appearing as defined correctly #13188
Unanswered
JimboGeesus
asked this question in
Help & Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have changed the names of my models to the same as they were in defined as I advised to do this to get my "include" returns working correctly. Since then despite both my const name and define name being the exact same, I am getting multiple tables created for the same model on PGadmin. This has now caused me problems as my initialised values and foreign keys are appearing on different tables.
Is this a common problem? Would I best changing back to the old naming structure? I had previously just put an s on the end of the define models however my "include" statements didn't return anything when I entered them all in my index.js/model file.
Could this be something to do with the way my pgAdmin is connected? as the connection goes back to last month I thought there might be old data somewhere. I had previously thought that Sequelize sync just wiped the folder and started again with the models / constraints / initialised values in my IDE.
Where could the old table names be getting pulled from? Is there a way to clear any previous syncs? I have no idea where the old names are coming from and it is causing me all sorts of problems. I have deleted, disconnected, changed the names multiple times and the old names are still appearing.
Beta Was this translation helpful? Give feedback.
All reactions