forked from mautrix/telegram
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from vector-im/tadzik/fix-rmau-column-sizes
Increase UserActivity DB column sizes
- Loading branch information
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
alembic/versions/143181919790_increase_account_activity_column_sizes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""increase account activity column sizes | ||
Revision ID: 143181919790 | ||
Revises: 97404229e75e | ||
Create Date: 2021-10-08 11:21:27.519129 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '143181919790' | ||
down_revision = '97404229e75e' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('user_activity', schema=None) as batch_op: | ||
batch_op.alter_column('first_activity_ts', | ||
existing_type=sa.INTEGER(), | ||
type_=sa.BigInteger(), | ||
existing_nullable=True) | ||
batch_op.alter_column('last_activity_ts', | ||
existing_type=sa.INTEGER(), | ||
type_=sa.BigInteger(), | ||
existing_nullable=True) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('user_activity', schema=None) as batch_op: | ||
batch_op.alter_column('last_activity_ts', | ||
existing_type=sa.BigInteger(), | ||
type_=sa.INTEGER(), | ||
existing_nullable=True) | ||
batch_op.alter_column('first_activity_ts', | ||
existing_type=sa.BigInteger(), | ||
type_=sa.INTEGER(), | ||
existing_nullable=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters