mirror of
https://github.com/TronoSfera/backup_service.git
synced 2026-05-18 10:03:32 +03:00
Merge pull request #2 from TronoSfera/codex/fix-sqlalchemy-mapped-annotation-error
Fix SQLAlchemy unmapped annotation startup error
This commit is contained in:
commit
d4256d6d77
1 changed files with 4 additions and 3 deletions
|
|
@ -35,10 +35,11 @@ from sqlalchemy import (
|
|||
Text,
|
||||
func,
|
||||
)
|
||||
from sqlalchemy.orm import declarative_base, relationship
|
||||
from sqlalchemy.orm import DeclarativeBase, relationship
|
||||
|
||||
|
||||
Base = declarative_base()
|
||||
class Base(DeclarativeBase):
|
||||
__allow_unmapped__ = True
|
||||
|
||||
|
||||
class User(Base):
|
||||
|
|
@ -270,4 +271,4 @@ class TaskRun(Base):
|
|||
status: str = Column(String(50), nullable=False)
|
||||
message: Optional[str] = Column(Text, nullable=True)
|
||||
|
||||
task: BackupTask = relationship("BackupTask", back_populates="runs")
|
||||
task: BackupTask = relationship("BackupTask", back_populates="runs")
|
||||
|
|
|
|||
Loading…
Reference in a new issue