Skip to content
Snippets Groups Projects
Unverified Commit b2ad53df authored by Ave O's avatar Ave O
Browse files

Fix a bug on movedomains.py

parent 052b6948
No related branches found
No related tags found
No related merge requests found
...@@ -10,14 +10,14 @@ import config ...@@ -10,14 +10,14 @@ import config
async def main(): async def main():
db = await asyncpg.create_pool(**config.db) db = await asyncpg.create_pool(**config.db)
old_domain = sys.argv[1] filename = sys.argv[1]
new_domain = sys.argv[2] new_domain = sys.argv[2]
exec_out = await db.execute(""" exec_out = await db.execute("""
UPDATE files UPDATE files
SET domain = $1 SET domain = $1
WHERE domain = $2 WHERE filename = $2
""", new_domain, old_domain) """, new_domain, filename)
print(f"db out: {exec_out}") print(f"db out: {exec_out}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment