def upgrade():
op.create_table(
'hosts_services',
sa.Column('host_id', sa.String(36), sa.ForeignKey('hosts.id')),
sa.Column('service_id', sa.String(36), sa.ForeignKey('services.id')),
sa.UniqueConstraint('host_id', 'service_id'))
with op.batch_alter_table('services') as batch_op:
batch_op.drop_constraint('fk_services_host_id_hosts')
batch_op.drop_column('host_id')
232c38fec944_service_host_many_to_many.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录