loopback-component-mongodb-mt-automigrate
Auto migrate with mongodb-mt connector
Instalation
Rum the command
npm install loopback-component-mongodb-mt-automigrate
or
´yarn add loopback-component-mongodb-mt-automigrate´
Component configurations
Required configurations to using this component
middleware.json
Need the loopback#token middleware in ./server/middleware.json
:
model-config.json
Add Models in ./server/model-config.json
component-config.json
Add loopback-component-mongodb-mt-automigrate
in ./server/component-config.json
-
autoupdate
: Update the model indexes without change the database data.automigrate
: Migrate the model with cleaning the database data.
Models configurations
Use in yours models the version
and indexes
attributes like this: