diff --git a/app/models.py b/app/models.py index d0b4b109..f2085399 100644 --- a/app/models.py +++ b/app/models.py @@ -1541,6 +1541,9 @@ class Contact(Base, ModelMixin): sa.Boolean, nullable=False, default=False, server_default="0" ) + # whether contact is created automatically during the forward phase + automatic_created = sa.Column(sa.Boolean, nullable=True, default=False) + @property def email(self): return self.website_email diff --git a/migrations/versions/2022_010710_698424c429e9_.py b/migrations/versions/2022_010710_698424c429e9_.py new file mode 100644 index 00000000..442fe565 --- /dev/null +++ b/migrations/versions/2022_010710_698424c429e9_.py @@ -0,0 +1,29 @@ +"""empty message + +Revision ID: 698424c429e9 +Revises: 753d2ed92d41 +Create Date: 2022-01-07 10:20:55.711691 + +""" +import sqlalchemy_utils +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '698424c429e9' +down_revision = '753d2ed92d41' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('contact', sa.Column('automatic_created', sa.Boolean(), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('contact', 'automatic_created') + # ### end Alembic commands ###