Skip to content

Commit

Permalink
Removing vector based on signal
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss committed Oct 25, 2023
1 parent 1a87c48 commit 32a4b19
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/dispatch/signal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from pydantic import Field
from sqlalchemy import (
select,
Boolean,
Column,
DateTime,
Expand All @@ -17,7 +16,7 @@
UniqueConstraint,
)
from sqlalchemy.dialects.postgresql import JSONB, UUID
from sqlalchemy.orm import relationship, column_property
from sqlalchemy.orm import relationship
from sqlalchemy_utils import TSVectorType

from dispatch.auth.models import DispatchUser
Expand Down Expand Up @@ -237,17 +236,6 @@ class SignalInstance(Base, TimeStampMixin, ProjectMixin):
signal = relationship("Signal", backref="instances")
signal_id = Column(Integer, ForeignKey("signal.id"))

signal_name = column_property(select([Signal.name]).where(Signal.id == signal_id))
signal_description = column_property(select([Signal.description]).where(Signal.id == signal_id))

search_vector = Column(
TSVectorType(
"signal_name",
"signal_description",
weights={"signal_name": "A", "signal_description": "B"},
)
)


# Pydantic models
class Service(DispatchBase):
Expand Down

0 comments on commit 32a4b19

Please sign in to comment.