invites-table-creating
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
2025-07-01 00:01:20 +03:00
parent 71f26a76c3
commit 2683982180
3 changed files with 127 additions and 45 deletions

View File

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