-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Database MigrationRepositoryIssues related to @loopback/repository packageIssues related to @loopback/repository packagefeatureneeds discussionstale
Description
Suggestion
Allow the developers running npm run migrate to decide which datasources and/or which models to include in the migration.
Use Cases
When an application access multiple datasources, e.g. SQL system-of-record maintained by a different team + MongoDB database for front-edge, the migration script should update only datasources in control of the team building the application (MongoDB in my example).
When a LB3 application is mounted in LB4, we may want to skip migration of LB3 models, see the discussion in #3779.
Examples
- Specify a list of datasource names to migrate (a whitelist)
- Specify a list of datasource names to not migrate (a blacklist)
- Specify a list of model names to not migrate (a blacklist)
- Provide a filter function accepting a datasource name & a model name and deciding whether to migrate schema for this particular combination or not.
Please note that SchemaMigrationOptions already has a field to limit migration to a given list of model names.
/cc @derdeka
Acceptance criteria
TBD - will be filled by the team.
mathias22osterhagen22mathias22osterhagen22
Metadata
Metadata
Assignees
Labels
Database MigrationRepositoryIssues related to @loopback/repository packageIssues related to @loopback/repository packagefeatureneeds discussionstale