OpenIDConnect icon indicating copy to clipboard operation
OpenIDConnect copied to clipboard

Error: `migrate: "alter"` strategy is not supported in production, please change to `migrate: "safe"`.

Open xgfd opened this issue 9 years ago • 0 comments

I'm getting the error in title in a production environment. The reason is that the default value of migrate of models is 'alter' in waterline. As suggested in this comment, adding the follwing

var options = {
    // other options
    defaults: {
        migrate: 'safe',
    }
}

OpenIDConnect.oidc(options);

can potentially resolve the issue. However the defaults option won't be forwarded to initialise waterline.

I probably missed something but I couldn't find an easy way to modify the migrate option of the underlying waterline, unless initialising waterline completely by myself and passing it to OpenIDConnect in the option.

Any fix to this?

xgfd avatar Aug 23 '16 14:08 xgfd