Skip to content

"Autoupdate" actually drops tables instead of altering them #1761

Description

@ricky92

I tried digging into the source code and found the cause to this issue:
https://github.com/strongloop/loopback-datasource-juggler/blob/6b83b6f4d1a4941917ffbaf8cebf476e40a53f83/lib/datasource.js#L1141

Apparently, the autoupdate function waits for the connection to be established before proceeding with its execution, but instead of queuing itself it queues the automigrate function. This causes tables to be dropped instead of altered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions