Skip to content

Database migrations for mounted LoopBack 3 Models #2825

Description

@nabdelgadir

Description / Steps to reproduce / Feature proposal

When mounting a LoopBack 3 application in a LoopBack 4 project using Lb3AppBooterComponent, running npm run migrate will not migrate the LoopBack 3 application's models.

Current Behaviour

By running npm run migrate, LoopBack 3 models are not migrated.

Expected Behaviour

By running npm run migrate, LoopBack 3 models are migrated in addition to LoopBack 4 models.

Acceptance Criteria

  • Use a non-in-memory datasource (e.g. MySQL, MongoDB) and run npm run migrate on a mounted application that has both LoopBack 3 and LoopBack 4 models. Make sure both LoopBack 3 and LoopBack 4 models are migrated properly.
    • currently it discovers all LB4 datasources in global LB4 context. since the LB3 app is bound to the context as a whole, you can access all the datasource objects that belong to it by doing lb3App.datasources

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions