def upgrade_production():
### commands auto generated by Alembic - please adjust! ###
op.create_table('comments',
sa.Column('id', sa.String(length=256), autoincrement=False, nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('created_utc', sa.DateTime(), nullable=True),
sa.Column('subreddit_id', sa.String(length=32), nullable=True),
sa.Column('post_id', sa.String(length=32), nullable=True),
sa.Column('user_id', sa.String(length=64), nullable=True),
sa.Column('comment_data', mysql.MEDIUMTEXT(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
op.create_index(op.f('ix_comments_post_id'), 'comments', ['post_id'], unique=False)
op.create_index(op.f('ix_comments_subreddit_id'), 'comments', ['subreddit_id'], unique=False)
op.create_index(op.f('ix_comments_user_id'), 'comments', ['user_id'], unique=False)
### end Alembic commands ###
e06fa0a86214_added_comment_model.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录