Fix SQLAlchemy import: Real -> REAL
SQLAlchemy exports REAL (uppercase), not Real. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pgvector.sqlalchemy import Vector
|
||||
from sqlalchemy import BigInteger, DateTime, Index, Integer, Real, Text, func
|
||||
from sqlalchemy import REAL, BigInteger, DateTime, Index, Integer, Text, func
|
||||
from sqlalchemy.dialects.postgresql import JSONB
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
@@ -69,7 +69,7 @@ class SimilarityLink(Base):
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
source_track_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
target_track_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
lastfm_match: Mapped[float | None] = mapped_column(Real)
|
||||
lastfm_match: Mapped[float | None] = mapped_column(REAL)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
__table_args__ = (
|
||||
@@ -107,7 +107,7 @@ class PlaylistTrack(Base):
|
||||
track_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
position: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
is_known: Mapped[bool] = mapped_column(nullable=False)
|
||||
similarity_score: Mapped[float | None] = mapped_column(Real)
|
||||
similarity_score: Mapped[float | None] = mapped_column(REAL)
|
||||
|
||||
playlist: Mapped[Playlist] = relationship(back_populates="tracks")
|
||||
track: Mapped[Track] = relationship()
|
||||
|
||||
Reference in New Issue
Block a user