merge duplicate communities #348

This commit is contained in:
rimu 2024-11-19 19:00:36 +13:00
parent f9d8ac555a
commit 973a0c3110

View file

@ -57,6 +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_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_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_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)})
# Delete the duplicate users # Delete the duplicate users
conn.execute(text('DELETE FROM "community" WHERE id IN :old_ids'), {"old_ids": tuple(old_ids)}) conn.execute(text('DELETE FROM "community" WHERE id IN :old_ids'), {"old_ids": tuple(old_ids)})