def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
consent_type_type = postgresql.ENUM('FORM', 'INFORMATION_SHEET', name='consent_type_type')
consent_type_type.create(op.get_bind())
op.add_column('consents', sa.Column('consent_type', sa.Enum('FORM', 'INFORMATION_SHEET', name="consent_type_type"), nullable=True))
consent_type = sa.table('consents', sa.column('consent_type'))
op.execute(consent_type.update().values(consent_type='FORM'))
op.alter_column('consents', 'consent_type', nullable=False)
op.add_column('consents', sa.Column('weight', sa.Integer(), nullable=True))
# ### end Alembic commands ###
98860d4e5dfb_add_type_and_weight_to_consent_model.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录