Skip to content Skip to sidebar Skip to footer

Loopback Automigrate Vs Autoupdate

When we have model and we want to migrate it to database, we simply create script in server/boot with: server.dataSource['myDbSource'].automigrate('MyMode', function(err){...}) or

Solution 1:

They both have their specific uses. Auto-migrate if you don't care about your data (ie. drop the table and recreate it). Auto-update if you don't want to accidentally delete existing data. See auto-migrate documentation


Post a Comment for "Loopback Automigrate Vs Autoupdate"