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

Failed to run db sync after changing project name in the config #142

Open
wonder-sk opened this issue Aug 22, 2024 · 0 comments · May be fixed by #143
Open

Failed to run db sync after changing project name in the config #142

wonder-sk opened this issue Aug 22, 2024 · 0 comments · May be fixed by #143
Labels
bug Something isn't working

Comments

@wonder-sk
Copy link
Contributor

A situation that confuses db-sync currently:

  1. dbsync is started (from database) with project A and base schema A in the database
  2. dbsync is stopped
  3. user modifies the configuration to use a newly created project B (at version 0), but does not remove the base schema A
  4. dbsync is started again - it prints that "Modified and base schemas already exist" and then fails to download a non-existent version of a project

This is because in dbsync.py in init(), when the base schema exists and the project directory does not exist, we are downloading the project at the version that is read from the base schema's metadata - but without checking it is the same project ID

The correct behavior should be to detect that base schema has been used with a different project ID, and then throw a db sync error, with a suggestion to run db sync with --force-init (or to delete the base schema manually).

@wonder-sk wonder-sk added the bug Something isn't working label Aug 22, 2024
@JanCaha JanCaha linked a pull request Sep 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant