Merge branch 'master' of github.com:1602/jugglingdb

This commit is contained in:
Anatoliy Chakkaev 2013-01-15 17:55:08 +07:00
commit fb8d0acc80
1 changed files with 6 additions and 2 deletions

View File

@ -93,9 +93,13 @@ function loadSchema(schema, railway, app, models) {
fn(context, require);
}
// and freeze schemas
// autoupdate if set app.enable('autoupdate') or freeze schemas by default
railway.orm._schemas.forEach(function (schema) {
schema.freeze();
if(app.enabled('autoupdate')){
schema.autoupdate();
} else {
schema.freeze();
}
});
}