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

Send migration path before command execution #140

Merged
merged 1 commit into from
Nov 28, 2021
Merged

Conversation

mesaugat
Copy link
Member

@mesaugat mesaugat commented Nov 25, 2021

While running the migration commands, it kept failing. The reason was because the prepare function didn't know about the migration path. A quick fix has been applied to each function in api.ts which makes the prepare function aware of the migration path.

Before:

migrate-list

 ▸ db1 - Failed
   Error: ENOENT: no such file or directory, scandir '/Users/saugat/Code/laudio/db/insights/migrations'

    TransactionError: Can't rollback transaction. There is a request in progress.
    Code: EREQINPROG
error Command failed with exit code 1.

---

migrate

 ▸ db1
   [✓] Rollback - started
   [✖] Rollback - failed (0s)

    TransactionError: Can't rollback transaction. There is a request in progress.
    Code: EREQINPROG
error Command failed with exit code 1.

After:

migrate

 ▸ db1
   [✓] Synchronization - started
   [✓] Synchronization - pruned (0s)
   [✓] Migrations - up to date (0.11s)
   [✓] Synchronization - completed (0.28s)

@mesaugat mesaugat changed the title Send migration path to prepare command before execution Send migration path before command execution Nov 25, 2021
@mesaugat mesaugat merged commit d2a3f16 into master Nov 28, 2021
@mesaugat mesaugat deleted the fix-migration-path branch November 28, 2021 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants