e06fa0a86214_added_comment_model.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:CivilServant 作者: mitmedialab 项目源码 文件源码
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 ###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号