diff --git a/app/models.py b/app/models.py index d7a17ff7..50e4b029 100644 --- a/app/models.py +++ b/app/models.py @@ -2503,6 +2503,8 @@ class Metric2(Base, ModelMixin): nb_block_last_24h = sa.Column(sa.Float, nullable=True) nb_reply_last_24h = sa.Column(sa.Float, nullable=True) nb_bounced_last_24h = sa.Column(sa.Float, nullable=True) + # includes bounces for both forwarding and transactional email + nb_total_bounced_last_24h = sa.Column(sa.Float, nullable=True) nb_verified_custom_domain = sa.Column(sa.Float, nullable=True) diff --git a/migrations/versions/2021_101510_2f1b3c759773_.py b/migrations/versions/2021_101510_2f1b3c759773_.py new file mode 100644 index 00000000..90128ebc --- /dev/null +++ b/migrations/versions/2021_101510_2f1b3c759773_.py @@ -0,0 +1,29 @@ +"""empty message + +Revision ID: 2f1b3c759773 +Revises: d750d578b068 +Create Date: 2021-10-15 10:46:00.389295 + +""" +import sqlalchemy_utils +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '2f1b3c759773' +down_revision = 'd750d578b068' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('metric2', sa.Column('nb_total_bounced_last_24h', sa.Float(), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('metric2', 'nb_total_bounced_last_24h') + # ### end Alembic commands ###