0cfce1799c57_.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:CodeGra.de 作者: CodeGra-de 项目源码 文件源码
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('Comment_File_id_fkey', 'Comment', type_='foreignkey')
    op.drop_constraint('Comment_User_id_fkey', 'Comment', type_='foreignkey')
    op.create_foreign_key('Comment_User_id_fkey', 'Comment', 'User', ['User_id'], ['id'], ondelete='CASCADE')
    op.create_foreign_key('Comment_File_id_fkey', 'Comment', 'File', ['File_id'], ['id'], ondelete='CASCADE')

    op.drop_index('ix_LinterComment_File_id', table_name='LinterComment')
    op.drop_constraint('LinterComment_File_id_fkey', 'LinterComment', type_='foreignkey')
    op.create_index(op.f('ix_LinterComment_File_id'), 'LinterComment', ['File_id'], unique=False)
    op.create_foreign_key('LinterComment_File_id_fkey', 'LinterComment', 'File', ['File_id'], ['id'], ondelete='CASCADE')

    op.drop_constraint('LinterInstance_Work_id_fkey', 'LinterInstance', type_='foreignkey')
    op.create_foreign_key('LinterInstance_Work_id_fkey', 'LinterInstance', 'Work', ['Work_id'], ['id'], ondelete='CASCADE')
    # ### end Alembic commands ###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号