def upgrade_test():
### commands auto generated by Alembic - please adjust! ###
op.create_table('mod_actions',
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('mod', sa.String(length=64), nullable=True),
sa.Column('target_author', sa.String(length=64), nullable=True),
sa.Column('action', sa.String(length=256), nullable=True),
sa.Column('target_fullname', sa.String(length=256), nullable=True),
sa.Column('action_data', mysql.MEDIUMTEXT(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id')
)
op.create_index(op.f('ix_mod_actions_subreddit_id'), 'mod_actions', ['subreddit_id'], unique=False)
op.create_index(op.f('ix_mod_actions_target_author'), 'mod_actions', ['target_author'], unique=False)
### end Alembic commands ###
4430bb0ac79d_add_modaction_model.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录