Skip to content

Commit

Permalink
do not migrate in the beginning (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc authored Feb 15, 2024
1 parent 7c644e1 commit d168b4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cashu/core/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def run_migration(db, migrations_module):
if version > current_versions.get(db_name, 0):
migration_needed = True
break
if migration_needed:
if migration_needed and settings.db_backup_path:
logger.debug(f"Creating backup of {db_name} db")
current_version = current_versions.get(db_name, 0)
await backup_database(db, current_version)
Expand Down
2 changes: 1 addition & 1 deletion cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class EnvSettings(CashuSettings):
cashu_dir: str = Field(default=os.path.join(str(Path.home()), ".cashu"))
debug_profiling: bool = Field(default=False)
debug_mint_only_deprecated: bool = Field(default=False)
db_backup_path: str = Field(default=False)
db_backup_path: Optional[str] = Field(default=None)


class MintSettings(CashuSettings):
Expand Down

0 comments on commit d168b4b

Please sign in to comment.