Skip to content

Commit

Permalink
task: Update Individual model and attempt to create new migration
Browse files Browse the repository at this point in the history
  • Loading branch information
reginafcompton committed Jun 20, 2019
1 parent 9ad653c commit 6f8c003
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# A generic, single database configuration.

[alembic]
script_location = alembic
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

Expand Down Expand Up @@ -42,4 +43,4 @@ formatter = generic

[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
datefmt = %H:%M:%S
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions mci_database/db/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ class Individual(db.Model):
telephone (str): Individual's telephone number.
telephone_2 (str): Indvidual's second known number.
telephone_3 (str): Individual's third known number.
"""
mci_id = db.Column(db.String(40), primary_key=True)
vendor_id = db.Column(db.String(40))
Expand All @@ -163,6 +167,8 @@ class Individual(db.Model):
date_of_birth = db.Column(db.Date, nullable=False)
email_address = db.Column(db.String(100))
telephone = db.Column(db.String(20))
telephone_2 = db.Column(db.String(20))
telephone_3 = db.Column(db.String(20))
mailing_address_id = db.Column(
db.Integer, db.ForeignKey(Address.id, ondelete='CASCADE'))
gender_id = db.Column(db.Integer, db.ForeignKey(
Expand All @@ -189,6 +195,8 @@ def __init__(self,
date_of_birth=None,
email_address=None,
telephone=None,
telephone_2=None,
telephone_3=None,
dispositions=None):
self.mci_id = MasterClientIDFactory.get_id()
self.vendor_id = vendor_id
Expand All @@ -201,6 +209,8 @@ def __init__(self,
self.date_of_birth = date_of_birth
self.email_address = email_address
self.telephone = telephone
self.telephone_2 = telephone_2
self.telephone_3 = telephone_3

@property
def as_dict(self):
Expand Down

0 comments on commit 6f8c003

Please sign in to comment.