parent
979d8409d5
commit
9b02a0bd5e
2 changed files with 40 additions and 2 deletions
|
@ -0,0 +1,38 @@
|
|||
'''
|
||||
resize post columns
|
||||
|
||||
Revision ID: 3c1f0316fa7f
|
||||
Created at: 2019-07-27 22:29:33.874837
|
||||
'''
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = '3c1f0316fa7f'
|
||||
down_revision = '1cd4c7b22846'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(
|
||||
'post', 'flags',
|
||||
type_=sa.Unicode(32),
|
||||
existing_type=sa.Unicode(200))
|
||||
|
||||
op.alter_column(
|
||||
'post', 'source',
|
||||
type_=sa.Unicode(2048),
|
||||
existing_type=sa.Unicode(200))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.alter_column(
|
||||
'post', 'flags',
|
||||
type_=sa.Unicode(200),
|
||||
existing_type=sa.Unicode(32))
|
||||
|
||||
op.alter_column(
|
||||
'post', 'source',
|
||||
type_=sa.Unicode(200),
|
||||
existing_type=sa.Unicode(2048))
|
|
@ -170,8 +170,8 @@ class Post(Base):
|
|||
creation_time = sa.Column('creation_time', sa.DateTime, nullable=False)
|
||||
last_edit_time = sa.Column('last_edit_time', sa.DateTime)
|
||||
safety = sa.Column('safety', sa.Unicode(32), nullable=False)
|
||||
source = sa.Column('source', sa.Unicode(200))
|
||||
flags_string = sa.Column('flags', sa.Unicode(200), default='')
|
||||
source = sa.Column('source', sa.Unicode(2048))
|
||||
flags_string = sa.Column('flags', sa.Unicode(32), default='')
|
||||
|
||||
# content description
|
||||
type = sa.Column('type', sa.Unicode(32), nullable=False)
|
||||
|
|
Loading…
Reference in a new issue