cleanup+uv
Some checks failed
Deploy on push / deploy (push) Failing after 7s

This commit is contained in:
2025-08-12 13:14:49 +03:00
parent fcd20a6533
commit bd5b996dab
9 changed files with 0 additions and 492 deletions

View File

@@ -336,27 +336,6 @@ async def fix_all_users_reader_role() -> dict[str, int]:
return stats
```
#### 3. Миграция из старой системы
```python
def migrate_old_roles_to_community_author():
"""Переносит роли из старой системы в CommunityAuthor"""
# Получаем все старые роли из Author.roles
old_roles = session.query(AuthorRole).all()
for role in old_roles:
# Создаем запись CommunityAuthor
ca = CommunityAuthor(
community_id=role.community,
author_id=role.author,
roles=role.role
)
session.add(ca)
session.commit()
```
## API для работы с ролями
### GraphQL мутации