forked from LBRYCommunity/lbry-sdk
use fetchall as there is an update while iterating
This commit is contained in:
parent
dc4560cc9a
commit
b91f27219d
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ def do_migration(conf):
|
|||
cursor = connection.cursor()
|
||||
|
||||
query = "select stream_hash, sd_hash from main.stream"
|
||||
for stream_hash, sd_hash in cursor.execute(query):
|
||||
for stream_hash, sd_hash in cursor.execute(query).fetchall():
|
||||
head_blob_hash = cursor.execute(
|
||||
"select blob_hash from stream_blob where position = 0 and stream_hash = ?",
|
||||
(stream_hash,)
|
||||
|
|
Loading…
Reference in a new issue