mirror of
https://github.com/TronoSfera/backup_service.git
synced 2026-05-18 10:03:32 +03:00
Fix SQLAlchemy unmapped annotation error
This commit is contained in:
parent
b2a3b895ba
commit
e68920550d
1 changed files with 4 additions and 3 deletions
|
|
@ -35,10 +35,11 @@ from sqlalchemy import (
|
||||||
Text,
|
Text,
|
||||||
func,
|
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):
|
class User(Base):
|
||||||
|
|
@ -270,4 +271,4 @@ class TaskRun(Base):
|
||||||
status: str = Column(String(50), nullable=False)
|
status: str = Column(String(50), nullable=False)
|
||||||
message: Optional[str] = Column(Text, nullable=True)
|
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