mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-19 22:14:12 -04:00
Added constraints to services.postage: not nullable and can only containt "first" or "second"
This commit is contained in:
@@ -353,7 +353,9 @@ class Service(db.Model, Versioned):
|
||||
crown = db.Column(db.Boolean, index=False, nullable=False, default=True)
|
||||
rate_limit = db.Column(db.Integer, index=False, nullable=False, default=3000)
|
||||
contact_link = db.Column(db.String(255), nullable=True, unique=False)
|
||||
postage = db.Column(db.String(255), index=False, nullable=True)
|
||||
postage = db.Column(db.String(255), index=False, nullable=False, default='second')
|
||||
|
||||
CheckConstraint("'postage' in ('first', 'second')")
|
||||
|
||||
organisation = db.relationship(
|
||||
'Organisation',
|
||||
|
||||
Reference in New Issue
Block a user