Changes following review:

- Check if right keys in new history rows
- Improve model and get rid of old revision version
- Add updated migration file
- Test data when inserting into inbound sms history
This commit is contained in:
Pea Tyczynska
2019-12-20 12:34:59 +00:00
parent 448cd1e94e
commit f8ff2d121f
4 changed files with 36 additions and 11 deletions

View File

@@ -1901,9 +1901,9 @@ class InboundSms(db.Model):
class InboundSmsHistory(db.Model, HistoryModel):
__tablename__ = 'inbound_sms_history'
id = db.Column(UUID(as_uuid=True), primary_key=True)
created_at = db.Column(db.DateTime, nullable=False)
created_at = db.Column(db.DateTime, index=True, unique=False, nullable=False)
service_id = db.Column(UUID(as_uuid=True), db.ForeignKey('services.id'), index=True, unique=False)
service = db.relationship('Service', backref='inbound_sms_history') # what does this one do?
service = db.relationship('Service')
notify_number = db.Column(db.String, nullable=False)
provider_date = db.Column(db.DateTime)
provider_reference = db.Column(db.String)