Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163578
D7324.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7324.id.diff
View Options
diff --git a/swh/core/cli/db.py b/swh/core/cli/db.py
--- a/swh/core/cli/db.py
+++ b/swh/core/cli/db.py
@@ -389,13 +389,19 @@
f"{ds_version} of the datastore backend {db_module}"
)
- new_db_version = swh_db_upgrade(dbname, module, to_version)
- click.secho(f"Migration to version {new_db_version} done", fg="green")
- if new_db_version < ds_version:
+ if to_version == db_version:
click.secho(
- f"Warning: migration was not complete: the current version is {ds_version}",
- fg="yellow",
+ f"No migration needed: the current version is {db_version}", fg="yellow",
)
+ else:
+ new_db_version = swh_db_upgrade(dbname, module, to_version)
+ click.secho(f"Migration to version {new_db_version} done", fg="green")
+ if new_db_version < ds_version:
+ click.secho(
+ "Warning: migration was not complete: "
+ f"the current version is {ds_version}",
+ fg="yellow",
+ )
def get_dburl_from_config(cfg):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 10:46 AM (1 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223740
Attached To
D7324: Do not do call swh_db_upgrade if not needed in `swh db upgrade`
Event Timeline
Log In to Comment