-
Notifications
You must be signed in to change notification settings - Fork 369
Closed
Description
sync(function(err) { /*...*/ } in release 2.0.4 does neither produce an error nor create the underlying tables. Reproducable by this snippet on PostgreSQL 9.0:
var orm = require('orm'),
config = require('../config');
orm.connect('postgresql://' +
config.database.username + ':' + config.database.password +
'@' + config.database.host + '/' + config.database.name,
function(err, db) {
if(err) console.error(err);
var Test = db.define('test', {
val1: String,
val2: Number,
val3: Boolean,
val4: [ 'A', 'B', 'C' ],
val5: Buffer
});
Test.sync(function(err) {
if(err) console.error(err);
else console.log('Test synced');
})
db.sync(function(err) {
if(err) console.error(err);
else console.log('Database synced');
});
}
);Output:
Test synced
Database synced
The database exists and the user does have the rights to access it and create tables.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels