Skip to content

Migrate schema of a selected subset of models or datasources #3819

@bajtos

Description

@bajtos

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.

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