nodejh / sequelize-automate

Automatically generate bare sequelize models from your database.
MIT License
116 stars 22 forks source link

problem with uUIDV4 into PostgreSQL #23

Open eniocsj opened 4 years ago

eniocsj commented 4 years ago

Hello! First, I would like to apologize for my poor English, as well as congratulate you on your wonderful work on this package. The problem - and see that it is a limit of Sequelize - is that when using DataType 'UUIDV4', you must put the type as UUID and defaultValue for UUIDV4. When using sequelize-automate, it imports tables with UUIDV4 field with type UUIDV4 and defaultValue null. If you want to synchronize this model without making this change manually, you are unable to synchronize it with the database. I tried to find a way to modify this in the source of your project, but my knowledge of JS is even worse than my English. I know it's silly, but I hope I could have collaborated with something. it's all. And again... Congratulations.

nodejh commented 4 years ago

Hi @eniocsj , Thanks for your feedback. I understand your problem and I will fix it.