question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running migrations with '--dryrun' modifies the db sometimes.

See original GitHub issue

I noticed an inconsistency when running migration scripts with the --dryrun option. I was testing out my code to copy data from one collection to a new one. Whenever a change to the script was made, I ran the migration script which worked as expected on most occasions but made changes to the db sometimes. The new collection is created and the supplied data is added.

The expected behaviour is that the new collection should not be created when using --dryrun.

Command ran: fireway migrate --dryrun Fireway fireway@1.0.2 Node: v14.16.0 OS: macOS Catalina

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
josheverettcommented, Oct 14, 2021

@42ae would you mind sharing a snippet showing the async calls you left open? Want to see what to avoid.

1reaction
42aecommented, Oct 14, 2021

Heads up, if that is the problem, there may be a solution that could improve compatibility. Just lmk

hey @kevlened, we have adapted our scripts to use the fireway-provided firestore instance like you suggested, but still seeing this problem. what is the compatibility solution you had in mind?

Hi @kiptoomm I was facing the same issue today. Make sure you don’t leave any open async calls when running your migration, that was the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to implement a “dry run mode” for data imports in Django
In data import processes it's often useful to have a “dry run” mode, that runs through the process but doesn't actually save the...
Read more >
flyway.dryRunOutput - Dry Run Output - Flyway
Preview changes without altering the database. Quite often a migration may be making use of placeholders, such as in the following statement: INSERT...
Read more >
Do a dry-run of an Alembic upgrade - Stack Overflow
A simple trick to allow this is to inject a conditional rollback into the run_migrations_online function in env.py that fires only when some ......
Read more >
Managing Migrations - Doctrine
vendor/bin/doctrine-migrations migrate --dry-run My Project Migrations ... execute a database migration that could result in schema changes and data loss.
Read more >
Using Dry-Run to ensure Success - Priasoft
Furthermore, no source changes are made for the same reasons. ... There are several key reasons to perform dry-run migrations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found