Skip to content

Async Migrator should have a default sync migration LIMIT  #584

@fisehara

Description

@fisehara

To reduce the complexity of an async migration file <>.async.ts which currently needs to specify two runnable migration functions:

  • asyncFn (runs with a limit to batch the affected rows)
  • syncFn runs without a limit to assure data consitency.

The default approach should be, that the async migrator executes the syncFn if specified.
If it's not specified it will run the asyncFn with a LIMIT ALL which is the same as not giving a limit.
This is a postgres specific case and a mysql case needs to be specified.

Then finalizing an async migration will automatically run the asyncFn without a limit.

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