0.5.9-collections-crud+spa-fix
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
2025-06-30 21:46:53 +03:00
parent 952b294345
commit 1e2c85e56a
14 changed files with 913 additions and 8 deletions

View File

@@ -9,13 +9,14 @@ query = QueryType()
mutation = MutationType()
type_draft = ObjectType("Draft")
type_community = ObjectType("Community")
resolvers: List[SchemaBindable] = [query, mutation, type_draft, type_community]
type_collection = ObjectType("Collection")
resolvers: List[SchemaBindable] = [query, mutation, type_draft, type_community, type_collection]
def create_all_tables() -> None:
"""Create all database tables in the correct order."""
from auth.orm import Author, AuthorBookmark, AuthorFollower, AuthorRating
from orm import community, draft, notification, reaction, shout, topic
from orm import collection, community, draft, notification, reaction, shout, topic
# Порядок важен - сначала таблицы без внешних ключей, затем зависимые таблицы
models_in_order = [
@@ -43,8 +44,8 @@ def create_all_tables() -> None:
AuthorBookmark, # Зависит от Author
notification.Notification, # Зависит от Author
notification.NotificationSeen, # Зависит от Notification
# collection.Collection,
# collection.ShoutCollection,
collection.Collection, # Зависит от Author
collection.ShoutCollection, # Зависит от Collection и Shout
# invite.Invite
]