merge duplicate communities #348

This commit is contained in:
rimu 2024-11-19 19:01:21 +13:00
parent 973a0c3110
commit c9c09329b7

View file

@ -57,7 +57,7 @@ def upgrade():
conn.execute(text('DELETE FROM "community_member" WHERE community_id IN :old_ids'), {"old_ids": tuple(old_ids)})
conn.execute(text('DELETE FROM "community_ban" WHERE community_id IN :old_ids'), {"old_ids": tuple(old_ids)})
conn.execute(text('DELETE FROM "community_join_request" WHERE community_id IN :old_ids'), {"old_ids": tuple(old_ids)})
conn.execute(text('DELETE FROM "community_langage" WHERE community_id IN :old_ids'), {"old_ids": tuple(old_ids)})
conn.execute(text('DELETE FROM "community_language" WHERE community_id IN :old_ids'), {"old_ids": tuple(old_ids)})
# Delete the duplicate users
conn.execute(text('DELETE FROM "community" WHERE id IN :old_ids'), {"old_ids": tuple(old_ids)})