Created
January 6, 2019 15:14
-
-
Save abhikhatri/ce128dfeedfd3da0c5b1f90165e4a4f8 to your computer and use it in GitHub Desktop.
Loopback script to migrate tables for default tables boot/server.js. EOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Importing the db structure for default apps | |
var appModels = ['User', 'AccessToken', 'ACL', 'RoleMapping', 'Role']; | |
var ds = app.dataSources.postgres; | |
ds.isActual(appModels, function (err, actual) { | |
if (!actual) { | |
ds.autoupdate(appModels, function (err) { | |
if (err) throw (err); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment