python类drop_index()的实例源码

8b3f167d0418_.py 文件源码 项目:triage 作者: dssg 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('predictions', schema='results')
    op.drop_table('feature_importances', schema='results')
    op.drop_table('evaluations', schema='results')
    op.drop_index(op.f('ix_results_models_model_hash'), table_name='models', schema='results')
    op.drop_table('models', schema='results')
    op.drop_table('model_groups', schema='results')
    op.drop_table('experiments', schema='results')
    op.execute('DROP SCHEMA results')
    # ### end Alembic commands ###
923a44238cd9_.py 文件源码 项目:do-portal 作者: certeu 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def downgrade():
    op.drop_table('tags_vulnerabilities')
    op.drop_table('reports')
    op.drop_table('vulnerabilities')
    op.drop_table('samples')
    op.drop_table('fqdns_typosquats')
    op.drop_table('ah_startup_config_params')
    op.drop_table('ah_runtime_config_params')
    op.drop_table('users')
    op.drop_table('ip_ranges')
    op.drop_table('fqdns')
    op.drop_table('emails_organizations')
    op.drop_table('contacts')
    op.drop_table('contactemails_organizations')
    op.drop_table('asn')
    op.drop_table('ah_startup_configs')
    op.drop_table('ah_runtime_configs')
    op.drop_index(op.f('ix_organizations_abbreviation'),
                  table_name='organizations')
    op.drop_table('organizations')
    op.drop_table('deliverable_files')
    op.drop_table('ah_bots')
    op.drop_table('tasks_taskmeta')
    op.drop_table('tasks_groupmeta')
    op.drop_table('tags')
    op.drop_index(op.f('ix_roles_default'), table_name='roles')
    op.drop_table('roles')
    op.drop_table('report_types')
    op.drop_table('organization_groups')
    op.drop_table('emails')
    op.drop_table('deliverables')
    op.drop_table('ah_bot_types')
a331c8728f7f_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_episode_search_vector', table_name='episode')
    op.drop_column('episode', 'search_vector')
    ### end Alembic commands ###
2298408681b6_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_tag_name'), table_name='tag')
    op.drop_column('tag', 'name')
    op.create_unique_constraint('podcast_name_key', 'podcast', ['name'])
    op.create_unique_constraint('podcast_feed_key', 'podcast', ['feed'])
    ### end Alembic commands ###
d3ebb90af68a_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('tag', 'updated_at')
    op.drop_column('tag', 'created_at')
    op.drop_index(op.f('ix_popular_term_term'), table_name='popular_term')
    op.drop_table('popular_term')
    ### end Alembic commands ###
358d9bf8f69a_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('episode_link_key', 'episode', ['link'])
    op.drop_index(op.f('ix_episode_link'), table_name='episode')
    op.alter_column('episode', 'title',
               existing_type=sa.VARCHAR(),
               nullable=True)
    ### end Alembic commands ###
5c5dc0258b2f_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_podcast_name'), table_name='podcast')
    op.drop_index(op.f('ix_podcast_feed'), table_name='podcast')
    op.drop_table('episode')
    ### end Alembic commands ###
012722a93d11_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_tag_id'), table_name='tag')
    op.drop_index(op.f('ix_popular_term_id'), table_name='popular_term')
    op.drop_index(op.f('ix_podcast_id'), table_name='podcast')
    op.drop_index(op.f('ix_episode_id'), table_name='episode')
    op.drop_index(op.f('ix_topic_suggestion_title'), table_name='topic_suggestion')
    op.drop_index(op.f('ix_topic_suggestion_id'), table_name='topic_suggestion')
    op.drop_table('topic_suggestion')
    ### end Alembic commands ###
8097d3d0862a_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('popular_term', sa.Column('date_search', sa.Date(), nullable=True))
    op.create_index(op.f('ix_popular_term_date_search'), 'popular_term', ['date_search'], unique=False)
    op.drop_index('ix_popular_term_term', table_name='popular_term')
    op.create_index(op.f('ix_popular_term_term'), 'popular_term', ['term'], unique=False)
    ### end Alembic commands ###
8097d3d0862a_.py 文件源码 项目:podigger 作者: perna 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_popular_term_term'), table_name='popular_term')
    op.create_index('ix_popular_term_term', 'popular_term', ['term'], unique=True)
    op.drop_index(op.f('ix_popular_term_date_search'), table_name='popular_term')
    op.drop_column('popular_term', 'date_search')
    ### end Alembic commands ###
f1ffa6279209_.py 文件源码 项目:1ibrary-gzhu 作者: 1ibrary 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_users_xh'), table_name='users')
    op.drop_table('users')
    # ### end Alembic commands ###
525c4fa30db4_.py 文件源码 项目:1ibrary-gzhu 作者: 1ibrary 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_hot_books_book_key'), table_name='hot_books')
    op.drop_table('hot_books')
    # ### end Alembic commands ###
e96fe0cc3a92_.py 文件源码 项目:1ibrary-gzhu 作者: 1ibrary 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('booklist_r')
    op.drop_table('subscribes')
    op.drop_index(op.f('ix_book_lists_user_id'), table_name='book_lists')
    op.drop_table('book_lists')
    op.drop_index(op.f('ix_books_book_key'), table_name='books')
    op.drop_table('books')
    # ### end Alembic commands ###
62d7e9633cf9_.py 文件源码 项目:league 作者: massgo 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('white_player_games')
    op.drop_table('roles')
    op.drop_table('black_player_games')
    op.drop_table('users')
    op.drop_index(op.f('ix_players_aga_id'), table_name='players')
    op.drop_table('players')
    op.drop_table('games')
    # ### end Alembic commands ###
8192905fd835_add_uuid_to_resource_class.py 文件源码 项目:zun 作者: openstack 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def upgrade():
    op.add_column('resource_class',
                  sa.Column('uuid', sa.String(length=36), nullable=False))
    op.create_unique_constraint('uniq_resource_class0uuid',
                                'resource_class', ['uuid'])
    op.drop_index('uniq_container0name', table_name='resource_class')
574083c098fc_create_retrospective_items_table.py 文件源码 项目:retrospective-bot 作者: bayesimpact 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def downgrade():
    op.drop_table('sprints')

    op.drop_index(op.f('ix_retrospective_items'), table_name='retrospective_items')
    op.drop_table('retrospective_items')
56ed7d33de8d_user_roles.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_roles_default', 'roles')
    op.drop_column('roles', 'permissions')
    op.drop_column('roles', 'default')
    ### end Alembic commands ###
456a945560f6_login_support.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_users_email', 'users')
    op.drop_column('users', 'password_hash')
    op.drop_column('users', 'email')
    ### end Alembic commands ###
51f5ccfba190_comments.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_comments_timestamp', 'comments')
    op.drop_table('comments')
    ### end Alembic commands ###
38c4e85512a9_initial_migration.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_users_username', 'users')
    op.drop_table('users')
    op.drop_table('roles')
    ### end Alembic commands ###


问题


面经


文章

微信
公众号

扫码关注公众号