aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/models.py')
-rw-r--r--python/Dawn/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index 24dc8b37..70a3cce7 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -171,6 +171,8 @@ class CDSDeal(db.Model):
upfront_settle_date = db.Column(db.Date, nullable=False)
initial_margin_percentage = db.Column(db.Float)
swap_type = db.Column(SWAP_TYPE, nullable=False)
+ orig_attach = db.Column(db.SmallInteger, info={'min': 0, 'max': 100})
+ orig_detach = db.Column(db.SmallInteger, info={'min': 0, 'max': 100})
attach = db.Column(db.Float, info={'min': 0., 'max': 100.})
detach = db.Column(db.Float, info={'min': 0., 'max': 100.})
corr_attach = db.Column(db.Float, info={'min': 0., 'max': 1.})
@@ -188,7 +190,7 @@ class CDSDeal(db.Model):
termination_counterparty = db.relationship(Counterparties, foreign_keys=[termination_cp])
fcm_account = db.relationship(Accounts, foreign_keys=[account_code])
__table_args__ = (db.CheckConstraint("swap_type!='CD_INDEX_TRANCHE' or " \
- "(attach is not NULL and detach is not NULL AND " \
+ "(orig_attach is not NULL and orig_detach is not NULL AND " \
"clearing_facility is NULL)"),)
class RepoDeal(db.Model):