dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 379 forks source link

model sync question #579

Open jackiesun8 opened 9 years ago

jackiesun8 commented 9 years ago

Hi,good job. I encounter some problem when using orm2 in mysql. I found that if there is no table created and i call model.sync().A new table will created.But when i change model's define and call model.sync,Nothing Happens. And then i follow the section that describes how to sync model using sql-ddl-sync,and the same result i got.The mysql table not synced.So,Why is it so?

dxg commented 9 years ago

You need to drop the table and create it again. If you have data inside it, I recommend writing migrations.

Some functionality was added which did this automatically, but it was not very stable & so it was disabled.