Trait_* models have incorrect type for key
Each of the TraitText, TraintInt, TraitFloat and TraitDatetime have key column which has its type defined incorrectly as Integer. The migrate script correctly defines the type as String(255). This fix updates the sqlalchemy Trait* models to define key as String(255). Closes-Bug: 1449752 Change-Id: I5ac2e9b811e3baa53e329732233cd0011a4d25b9
This commit is contained in:
parent
9f76e5b580
commit
b11d24afe7
@ -93,25 +93,25 @@ class Connection(base.Connection):
|
||||
- TraitInt
|
||||
- int trait value
|
||||
- { event_id: event -> event.id
|
||||
key: trait type
|
||||
key: trait name
|
||||
value: integer value
|
||||
}
|
||||
- TraitDatetime
|
||||
- int trait value
|
||||
- datetime trait value
|
||||
- { event_id: event -> event.id
|
||||
key: trait type
|
||||
key: trait name
|
||||
value: datetime value
|
||||
}
|
||||
- TraitText
|
||||
- int trait value
|
||||
- text trait value
|
||||
- { event_id: event -> event.id
|
||||
key: trait type
|
||||
key: trait name
|
||||
value: text value
|
||||
}
|
||||
- TraitFloat
|
||||
- int trait value
|
||||
- float trait value
|
||||
- { event_id: event -> event.id
|
||||
key: trait type
|
||||
key: trait name
|
||||
value: float value
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ class TraitText(Base):
|
||||
Index('ix_trait_text_event_id_key', 'event_id', 'key'),
|
||||
)
|
||||
event_id = Column(Integer, ForeignKey('event.id'), primary_key=True)
|
||||
key = Column(Integer, primary_key=True)
|
||||
key = Column(String(255), primary_key=True)
|
||||
value = Column(Text)
|
||||
|
||||
|
||||
@ -355,7 +355,7 @@ class TraitInt(Base):
|
||||
Index('ix_trait_int_event_id_key', 'event_id', 'key'),
|
||||
)
|
||||
event_id = Column(Integer, ForeignKey('event.id'), primary_key=True)
|
||||
key = Column(Integer, primary_key=True)
|
||||
key = Column(String(255), primary_key=True)
|
||||
value = Column(Integer)
|
||||
|
||||
|
||||
@ -367,7 +367,7 @@ class TraitFloat(Base):
|
||||
Index('ix_trait_float_event_id_key', 'event_id', 'key'),
|
||||
)
|
||||
event_id = Column(Integer, ForeignKey('event.id'), primary_key=True)
|
||||
key = Column(Integer, primary_key=True)
|
||||
key = Column(String(255), primary_key=True)
|
||||
value = Column(Float(53))
|
||||
|
||||
|
||||
@ -379,5 +379,5 @@ class TraitDatetime(Base):
|
||||
Index('ix_trait_datetime_event_id_key', 'event_id', 'key'),
|
||||
)
|
||||
event_id = Column(Integer, ForeignKey('event.id'), primary_key=True)
|
||||
key = Column(Integer, primary_key=True)
|
||||
key = Column(String(255), primary_key=True)
|
||||
value = Column(PreciseTimestamp())
|
||||
|
Loading…
Reference in New Issue
Block a user