Skip to content

Commit

Permalink
added migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ledovsky committed Jul 8, 2024
1 parent ea5b1d8 commit 681a0ca
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions alembic/versions/2024-07-08_meme_stats_add_lr_smoothed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""meme_stats_add_lr_smoothed
Revision ID: 4637e7d45ece
Revises: c648eec58be1
Create Date: 2024-07-08 20:07:28.122761
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4637e7d45ece'
down_revision = 'c648eec58be1'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('meme_stats', sa.Column('lr_smoothed', sa.Float(), server_default='0', nullable=False))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('meme_stats', 'lr_smoothed')
# ### end Alembic commands ###
1 change: 1 addition & 0 deletions src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
Column("raw_impr_rank", Integer, nullable=False, server_default="99999"),
Column("sec_to_react", Float, nullable=False, server_default="99999"), # median
Column("invited_count", Integer, nullable=False, server_default="0"),
Column("lr_smoothed", Float, nullable=False, server_default="0"),
Column(
"updated_at",
DateTime,
Expand Down

0 comments on commit 681a0ca

Please sign in to comment.