Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Migrator should have a default sync migration LIMIT #584

Open
fisehara opened this issue Nov 8, 2022 · 0 comments
Open

Async Migrator should have a default sync migration LIMIT #584

fisehara opened this issue Nov 8, 2022 · 0 comments

Comments

@fisehara
Copy link
Contributor

fisehara commented Nov 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant