Auto-create mysql table with StrongLoop

后端 未结 8 823
栀梦
栀梦 2021-02-07 11:39

I am trying to use Strongloop with MySql but cannot figure out how to migrate or automatically create tables into a MySql database.

Is there at least a way to export the

8条回答
  •  盖世英雄少女心
    2021-02-07 12:20

    To update and/or create all mysql tables for your models:

    var dataSource = app.dataSources.mysql;       
    dataSource.autoupdate(null, function (err) {
        if(err) return cb(err);
        return cb();
    });      
    

提交回复
热议问题