Skip to content

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

@xgfd

Description

@xgfd

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions