feat: add asset ID history API
This commit is contained in:
1 parent
a87ab2709f
commit
d738b8e27e
6 files changed
+254
-9
No files matched your search
@@ -347,15 +347,19 @@ class InventoryRepository:
|
||||
cur.execute(
|
||||
"""
|
||||
SELECT
|
||||
id,
|
||||
miner_id,
|
||||
old_asset_id,
|
||||
new_asset_id,
|
||||
changed_at,
|
||||
changed_by
|
||||
FROM miner_asset_id_history
|
||||
WHERE miner_id = %s
|
||||
ORDER BY changed_at, id
|
||||
history.id,
|
||||
history.miner_id,
|
||||
history.old_asset_id,
|
||||
history.new_asset_id,
|
||||
history.changed_at,
|
||||
history.changed_by,
|
||||
changed_by_user.display_name
|
||||
AS changed_by_display_name
|
||||
FROM miner_asset_id_history AS history
|
||||
JOIN users AS changed_by_user
|
||||
ON changed_by_user.id = history.changed_by
|
||||
WHERE history.miner_id = %s
|
||||
ORDER BY history.changed_at, history.id
|
||||
""",
|
||||
(miner_id,),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user