Created
January 6, 2019 17:58
-
-
Save abhikhatri/9ec31e3f4d6f7deee4309560ceb47909 to your computer and use it in GitHub Desktop.
script to automatically populate the models on boot
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
'use strict'; | |
module.exports = function(app) { | |
/* | |
* The `app` object provides access to a variety of LoopBack resources such as | |
* models (e.g. `app.models.YourModelName`) or data sources (e.g. | |
* `app.datasources.YourDataSource`). See | |
* https://loopback.io/doc/en/lb3/Working-with-LoopBack-objects.html | |
* for more info. | |
*/ | |
app.dataSources.postgres.autoupdate(); | |
console.log("Performed automigration."); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment