def upgrade_test():
### commands auto generated by Alembic - please adjust! ###
op.create_table('archived_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_archived_comments_created_at'), 'archived_comments', ['created_at'], unique=False)
op.create_index(op.f('ix_archived_comments_post_id'), 'archived_comments', ['post_id'], unique=False)
op.create_index(op.f('ix_archived_comments_subreddit_id'), 'archived_comments', ['subreddit_id'], unique=False)
op.create_index(op.f('ix_archived_comments_user_id'), 'archived_comments', ['user_id'], unique=False)
### end Alembic commands ###
aae7a3158d13_added_comment_archive_table_to_split_.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录