def upgrade_development():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('event_hooks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=256), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('experiment_id', sa.Integer(), nullable=True),
sa.Column('is_active', sa.Boolean(), nullable=True),
sa.Column('call_when', sa.Integer(), nullable=True),
sa.Column('caller_controller', sa.String(length=256), nullable=False),
sa.Column('caller_method', sa.String(length=256), nullable=False),
sa.Column('callee_module', sa.String(length=256), nullable=False),
sa.Column('callee_controller', sa.String(length=256), nullable=False),
sa.Column('callee_method', sa.String(length=256), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_event_hooks_experiment_id'), 'event_hooks', ['experiment_id'], unique=False)
op.create_index(op.f('ix_event_hooks_name'), 'event_hooks', ['name'], unique=False)
# ### end Alembic commands ###
a571e57d884a_create_eventhook_table.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录