Skip to content

Validate baseTypeId argument in migrateAll() #2

@cuibonobo

Description

@cuibonobo

Stack.migrateAll(baseTypeId) silently does nothing if the given baseTypeId doesn't match any known type family:

await stack.migrateAll('com.example.app/noot'); // typo — no error, no migration

This is easy to misuse and hard to debug. The method should validate that baseTypeId matches at least one registered type, and throw a descriptive error if not.

Could also warn (rather than throw) if a matching type family exists but has no pending migrations — i.e. all records are already at the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions