Change id column in LogEntry to a BigInt and migrate back to using that table

This commit is contained in:
Joseph Schorr 2018-07-27 17:46:46 -04:00
parent 5e4d52f1fd
commit 7325b22c90
8 changed files with 56 additions and 22 deletions

View file

@ -0,0 +1,33 @@
"""Change LogEntry to use a BigInteger as its primary key
Revision ID: 6c21e2cfb8b6
Revises: d17c695859ea
Create Date: 2018-07-27 16:30:02.877346
"""
# revision identifiers, used by Alembic.
revision = '6c21e2cfb8b6'
down_revision = 'd17c695859ea'
from alembic import op
import sqlalchemy as sa
def upgrade(tables, tester):
op.alter_column(
table_name='logentry',
column_name='id',
nullable=False,
autoincrement=True,
type_=sa.BigInteger(),
)
def downgrade(tables, tester):
op.alter_column(
table_name='logentry',
column_name='id',
nullable=False,
autoincrement=True,
type_=sa.Integer(),
)