dresende / node-orm2

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

Can orm2 create a table automatically? #659

Closed hacke2 closed 8 years ago

hacke2 commented 8 years ago

I use Hibernate in J2ee, when the datebase has't table the framework can create table and when fields changed it can update datebase, Can this be done?

dxg commented 8 years ago

It can manually create tables by calling .sync but does not do this automatically. It had some initial work done on updating columns, but this functionality was never completed and is disabled.

I recommend using database migrations which are described in the readme. It is the only way to guarantee data integrity when columns change.

hacke2 commented 8 years ago

OK,Thanks