This commit is contained in:
rimu 2024-11-15 16:06:28 +13:00
parent 3ca073779e
commit 3e0c94c77c

View file

@ -67,8 +67,8 @@ def upgrade():
conn.execute(text('UPDATE "community" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "community" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "domain_block" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "domain_block" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "community_block" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "community_block" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "user_follower" SET local_user_id = :new_id WHERE local_user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('DELETE FROM "user_follower" WHERE local_user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "user_follower" SET remote_user_id = :new_id WHERE remote_user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('DELETE FROM "user_follower" WHERE remote_user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "community_ban" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "community_ban" SET user_id = :new_id WHERE user_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "user_note" SET target_id = :new_id WHERE target_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "user_note" SET target_id = :new_id WHERE target_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})
conn.execute(text('UPDATE "user_block" SET blocked_id = :new_id WHERE blocked_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)}) conn.execute(text('UPDATE "user_block" SET blocked_id = :new_id WHERE blocked_id IN :old_ids'), {"new_id": new_id, "old_ids": tuple(old_ids)})