"""update_bounce_rate_tooltip Revision ID: 3ed255c14cd0 Revises: b6fdb404c14c Create Date: 2022-02-10 22:19:51.810161 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3ed255c14cd0' down_revision = 'b6fdb404c14c' branch_labels = None depends_on = None BOUNCE_RATE_METRIC_ID = 85 def get_metrics_field_table(bind): meta = sa.MetaData(bind=bind) meta.reflect() return meta.tables["MetricsField"] def upgrade(): bind = op.get_bind() metrics_field_table = get_metrics_field_table(bind) op.execute(metrics_field_table.update().where(metrics_field_table.c.id == BOUNCE_RATE_METRIC_ID).values( description="Rate at which people who landed on the Linkfire page, but did not perform an action." )) def downgrade(): bind = op.get_bind() metrics_field_table = get_metrics_field_table(bind) op.execute(metrics_field_table.update().where(metrics_field_table.c.id == BOUNCE_RATE_METRIC_ID).values( description="Number of people who landed on the Linkfire page, but did not perform an action." ))