Skip to content

Commit

Permalink
Merge pull request #6 from brighthive/feat/HIVE-876/add-vendor-creati…
Browse files Browse the repository at this point in the history
…on-date-to-model

feat: HIVE-876 Add a vendor creation date column to individual model
  • Loading branch information
gregmundy authored Jul 22, 2020
2 parents 8c197cf + 8fc4d7f commit c3abe80
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mci_database/db/migrations/versions/08dad05889a9_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""empty message
Revision ID: 08dad05889a9
Revises: 05c4d470cd9c
Create Date: 2020-07-22 13:07:06.139549
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '08dad05889a9'
down_revision = '05c4d470cd9c'
branch_labels = None
depends_on = None


def upgrade():
op.add_column('individual', sa.Column(
'vendor_creation_date', sa.DateTime(), nullable=True))


def downgrade():
op.drop_column('individual', 'vendor_creation_date')
1 change: 1 addition & 0 deletions mci_database/db/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class Individual(db.Model):
ssn = db.Column(db.String(20))
registration_date = db.Column(
db.DateTime, server_default=db.func.now(), nullable=False)
vendor_creation_date = db.Column(db.DateTime)
first_name = db.Column(db.String(100))
suffix = db.Column(db.String(10))
middle_name = db.Column(db.String(100))
Expand Down

0 comments on commit c3abe80

Please sign in to comment.