mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
tweak migration #348
This commit is contained in:
parent
ffd78bfd80
commit
827303c634
1 changed files with 5 additions and 5 deletions
|
@ -60,15 +60,15 @@ def upgrade():
|
|||
|
||||
# Update references in various tables
|
||||
conn.execute(text('UPDATE "post" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "post_vote" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "post_vote" SET author_id = :new_id WHERE author_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "post_vote" WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "post_vote" WHERE author_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "post_reply" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "post_reply_vote" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "post_reply_vote" SET author_id = :new_id WHERE author_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "post_reply_vote" WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "post_reply_vote" WHERE author_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "notification" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "notification" SET author_id = :new_id WHERE author_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "notification_subscription" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "community_member" SET user_id = :new_id WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "community_member" WHERE user_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('DELETE FROM "instance_role" WHERE user_id = :old_id'), {"old_id": old_id})
|
||||
conn.execute(text('UPDATE "chat_message" SET sender_id = :new_id WHERE sender_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
conn.execute(text('UPDATE "chat_message" SET recipient_id = :new_id WHERE recipient_id = :old_id'), {"new_id": new_id, "old_id": old_id})
|
||||
|
|
Loading…
Reference in a new issue