-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I want to perform Auto-migrate my models to my MongoDB database. I read this docs https://docs.strongloop.com/display/public/LB/Creating+a+database+schema+from+models
There is a code example.
var ds = require('../data-sources/db')('oracle');
var Customer = require('../models/customer');
ds.createModel(schema_v1.name, schema_v1.properties, schema_v1.options);
ds.automigrate(function () {
ds.discoverModelProperties('CUSTOMER_TEST', function (err, props) {
console.log(props);
});
});
I copy it and change a little to mongodb instead of oracle and I get error Cannot find module '../data-sources/db':
var ds = require('../data-sources/db')('mongodb');
How to perform an auto-migration?
Metadata
Metadata
Assignees
Labels
No labels