diff --git a/app/models.py b/app/models.py index 02eeec8137..e5696b6fbd 100644 --- a/app/models.py +++ b/app/models.py @@ -2181,6 +2181,9 @@ class VAProfileLocalCache(db.Model): communication_channel_id = db.Column(db.Integer, nullable=False) source_datetime = db.Column(db.DateTime, nullable=False) + participant_id = db.Column(db.Integer, nullable=True) + has_duplicate_mappings = db.Column(db.Boolean, nullable=False, default=False) + __table_args__ = ( UniqueConstraint('va_profile_id', 'communication_item_id', 'communication_channel_id', name='uix_veteran_id'), ) diff --git a/migrations/versions/0369_vaprofile_cache_fields.py b/migrations/versions/0369_vaprofile_cache_fields.py new file mode 100644 index 0000000000..44a0c8ae63 --- /dev/null +++ b/migrations/versions/0369_vaprofile_cache_fields.py @@ -0,0 +1,26 @@ +""" + +Revision ID:0369_vaprofile_cache_fields +Revises: 0368_servicesmssender_columns +Create Date: 2024-05-29 10:55:37 + +""" +from alembic import op +import sqlalchemy as sa + +revision = '0369_va_profile_cache_fields' +down_revision = '0368_servicesmssender_columns' + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('va_profile_local_cache', sa.Column('participant_id', sa.Integer(), nullable=True)) + op.add_column('va_profile_local_cache', sa.Column('has_duplicate_mappings', sa.Boolean(), nullable=False, server_default=sa.false())) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('va_profile_local_cache', 'has_duplicate_mappings') + op.drop_column('va_profile_local_cache', 'participant_id') + # ### end Alembic commands ###