Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123953
D5012.id17963.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
658 B
Subscribers
None
D5012.id17963.diff
View Options
diff --git a/swh/storage/postgresql/db.py b/swh/storage/postgresql/db.py
--- a/swh/storage/postgresql/db.py
+++ b/swh/storage/postgresql/db.py
@@ -1343,7 +1343,14 @@
def dbversion(self):
with self.transaction() as cur:
- cur.execute(f"SELECT {', '.join(self.dbversion_cols)} FROM dbversion")
+ cur.execute(
+ f"""
+ SELECT {', '.join(self.dbversion_cols)}
+ FROM dbversion
+ ORDER BY version DESC
+ LIMIT 1
+ """
+ )
return dict(zip(self.dbversion_cols, cur.fetchone()))
def check_dbversion(self):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 7:07 AM (11 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225037
Attached To
D5012: postgresql: Fix dbversion() to return the max version instead of a random one.
Event Timeline
Log In to Comment