Skip to content

Commit

Permalink
#54: Use EnumAsInteger Column type
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Sep 12, 2019
1 parent 10f974e commit ba49d1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ class JOB(Base, EntityHelper):
backref='JOB')



class KEYWORD(Base, EntityHelper):
__tablename__ = 'KEYWORD'
__table_args__ = (
Expand Down Expand Up @@ -624,7 +623,7 @@ class ValueTypeEnum(enum.Enum):
NAME = Column(String(255), nullable=False)
UNITS = Column(String(255), nullable=False)
UNITSFULLNAME = Column(String(255))
VALUETYPE = Column(Integer, nullable=False)
VALUETYPE = Column(EnumAsInteger(ValueTypeEnum), nullable=False)
VERIFIED = Column(Integer, server_default=FetchedValue())
FACILITY_ID = Column(ForeignKey('FACILITY.ID'), nullable=False)

Expand Down

0 comments on commit ba49d1e

Please sign in to comment.