Hey first time actually making questions on the site so i will try to be has detailed has possible.
Im trying to use sequelize auto to create the models and run them to create the relations of the tables using the file init-models.js( im portuguese so if i will try and translate the name of variables)
enter image description here
this image is my command prompt basicly i have 2 tables tipo_locais(typeof_places ex: fast food,park,wine gallery) and locais (places ex: burger king , viseu park) the tables seem to be organized so that they resemble my database creation script
enter image description here
this my tables that i created using my script, and the error seems to be complaining that my id_tipo_local variable isnt a primary key which doesnt seem right acording with this table
Im running sequelize-auto version 0.8.8
I expected it to be running fine since itsa primary key so it should be a unique constraint, in my previous attempts since i was using a script straigth from some classmates i tough they might have had a problem with pulling 2 foreign keys from the same table. so i tried to tinker with it until i have what was laid on the problem section.
enter image description here
André Albuquerque is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.