Make postage column part of ft_billing primary key

Now that the postage column is populated and there are no null values,
it can be added to the composite primary key of ft_billing.
This commit is contained in:
Katie Smith
2018-09-26 15:09:13 +01:00
parent f034c26e19
commit f41e0f05ec
2 changed files with 40 additions and 1 deletions

View File

@@ -1811,7 +1811,7 @@ class FactBilling(db.Model):
rate_multiplier = db.Column(db.Integer(), nullable=False, primary_key=True)
international = db.Column(db.Boolean, nullable=False, primary_key=True)
rate = db.Column(db.Numeric(), nullable=False, primary_key=True)
postage = db.Column(db.String)
postage = db.Column(db.String, nullable=False, primary_key=True)
billable_units = db.Column(db.Integer(), nullable=True)
notifications_sent = db.Column(db.Integer(), nullable=True)
created_at = db.Column(db.DateTime, nullable=False, default=datetime.datetime.utcnow)