How to use the alembic.op.drop_index function in alembic

To help you get started, we’ve selected a few alembic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Weasyl / weasyl / libweasyl / libweasyl / alembic / versions / 8c2635571571_allow_index_to_be_used_for_comment_.py View on Github external
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('ind_journalcomment_targetid_settings', 'journalcomment', ['targetid', 'settings'], unique=False)
    op.create_index('ind_journalcomment_targetid', 'journalcomment', ['targetid'], unique=False)
    op.create_index('ind_journalcomment_settings', 'journalcomment', ['settings'], unique=False)
    op.drop_index('ind_journalcomment_targetid_commentid', table_name='journalcomment')
    op.create_index('ix_comments_target_user', 'comments', ['target_user'], unique=False)
    op.create_index('ix_comments_target_sub', 'comments', ['target_sub'], unique=False)
    op.drop_index('ind_comments_target_user_commentid', table_name='comments')
    op.drop_index('ind_comments_target_sub_commentid', table_name='comments')
    op.create_index('ind_charcomment_targetid', 'charcomment', ['targetid'], unique=False)
    op.drop_index('ind_charcomment_targetid_commentid', table_name='charcomment')
    # ### end Alembic commands ###
github gateway4labs / labmanager / alembic / versions / 4bc4c1ae0f38_add_missing_indexes.py View on Github external
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_request_permissions_lt_local_identifier', table_name='request_permissions_lt')
    op.drop_index('ix_request_permissions_lt_accessible', table_name='request_permissions_lt')
    op.drop_index('ix_permissions2ltuser_permission_to_lt_id', table_name='permissions2ltuser')
    op.drop_index('ix_permissions2ltuser_lt_user_id', table_name='permissions2ltuser')
    op.drop_index('ix_permissions2lt_local_identifier', table_name='permissions2lt')
    op.drop_index('ix_permissions2lt_accessible', table_name='permissions2lt')
    op.drop_index('ix_lt_users_login', table_name='lt_users')
    op.drop_index('ix_learning_tools_name', table_name='learning_tools')
    op.drop_index('ix_learning_tools_full_name', table_name='learning_tools')
    op.drop_index('ix_laboratories_visibility', table_name='laboratories')
    op.drop_index('ix_laboratories_publicly_available', table_name='laboratories')
    op.drop_index('ix_laboratories_available', table_name='laboratories')
    ### end Alembic commands ###
github acoustid / acoustid-server / alembic / versions / 57c4d22c87b8_initial.py View on Github external
op.drop_index('track_idx_gid', table_name='track')
    op.drop_table('track')
    op.drop_index('stats_user_agents_idx_date', table_name='stats_user_agents')
    op.drop_table('stats_user_agents')
    op.drop_index('stats_lookups_idx_date', table_name='stats_lookups')
    op.drop_table('stats_lookups')
    op.drop_index('stats_idx_name_date', table_name='stats')
    op.drop_index('stats_idx_date', table_name='stats')
    op.drop_table('stats')
    op.drop_table('replication_control')
    op.drop_index('recording_acoustid_idx_uniq', table_name='recording_acoustid')
    op.drop_index(op.f('recording_acoustid_idx_acoustid'), table_name='recording_acoustid')
    op.drop_table('recording_acoustid')
    op.drop_table('mirror_queue')
    op.drop_table('meta')
    op.drop_index('format_idx_name', table_name='format')
    op.drop_table('format')
    op.drop_index('foreignid_vendor_idx_name', table_name='foreignid_vendor')
    op.drop_table('foreignid_vendor')
    op.drop_table('fingerprint_index_queue')
    op.drop_index('application_idx_apikey', table_name='application')
    op.drop_table('application')
    op.drop_table('acoustid_mb_replication_control')
    op.drop_table('account_stats_control')
    op.drop_index('account_google_idx_account_id', table_name='account_google')
    op.drop_table('account_google')
github weblabdeusto / weblabdeusto / server / src / weblab / db / upgrade / regular / versions / 31ded1f6ad6_add_data_required_fo.py View on Github external
def downgrade():
    op.drop_index(u'idx_UserUsedExperiment_user_experiment', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_user_origin', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_experiment_id_group_id', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_experiment_id_user_id', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_experiment_id_permission_id', 'UserUsedExperiment')

    op.drop_index('idx_UserUsedExperiment_user_group_permission_id','UserUsedExperiment')
    op.drop_index('idx_UserUsedExperiment_user_user_permission_id', 'UserUsedExperiment')
    op.drop_index('idx_UserUsedExperiment_user_role_permission_id', 'UserUsedExperiment')

    op.drop_index(u'idx_UserUsedExperiment_timetable', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_start_date_date', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_start_date_weekday', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_session_time_micro', 'UserUsedExperiment')
    op.drop_index(u'idx_UserUsedExperiment_start_date_hour', 'UserUsedExperiment')

    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column(u'UserUsedExperiment', 'start_date_hour')
    op.drop_column(u'UserUsedExperiment', 'session_time_micro')
github cloudify-cosmo / cloudify-manager / resources / rest-service / cloudify / migrations / versions / 423a1643f365_4_6_to_5_0.py View on Github external
def _drop_sites_table():
    op.drop_constraint(op.f('deployments__site_fk_fkey'),
                       'deployments',
                       type_='foreignkey')
    op.drop_column('deployments', '_site_fk')
    op.drop_index(op.f('sites_id_idx'), table_name='sites')
    op.drop_index(op.f('sites_created_at_idx'), table_name='sites')
    op.drop_index(op.f('sites__tenant_id_idx'), table_name='sites')
    op.drop_table('sites')
github indico / newdle / newdle / migrations / versions / 20190912_1718_000000000000_create_initial_tables.py View on Github external
def downgrade():
    op.drop_index(op.f('ix_uq_participants_code'), table_name='participants')
    op.drop_index(op.f('ix_participants_newdle_id'), table_name='participants')
    op.drop_table('participants')
    op.drop_index(op.f('ix_uq_newdles_code'), table_name='newdles')
    op.drop_index(op.f('ix_newdles_creator_uid'), table_name='newdles')
    op.drop_table('newdles')
github Netflix / security_monkey / migrations / versions / bfb550a500ab_.py View on Github external
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_item_name', table_name='item')
    op.drop_index('ix_item_arn', table_name='item')
    op.drop_index('ix_item_latest_revision_durable_hash', table_name='item')
    op.drop_index('ix_item_latest_revision_complete_hash', table_name='item')
    op.drop_column('item', 'arn')
    op.drop_column('item', 'latest_revision_complete_hash')
    op.drop_column('item', 'latest_revision_durable_hash')
    ### end Alembic commands ###
github fedspendingtransparency / data-act-broker-backend / dataactcore / migrations / versions / 8290ddf8d51b_upper_indexes_for_subawards_filec.py View on Github external
def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('ix_fsrs_proc_contract_number_upper', table_name='fsrs_procurement')
    op.drop_index('ix_fsrs_proc_idv_ref_upper', table_name='fsrs_procurement')
    op.drop_index('ix_fsrs_proc_contract_office_aid_upper', table_name='fsrs_procurement')

    op.drop_index('ix_fsrs_grant_fain_upper', table_name='fsrs_grant')

    op.drop_index('ix_subaward_award_id_upper', table_name='subaward')
    op.drop_index('ix_subaward_parent_award_id_upper', table_name='subaward')
    op.drop_index('ix_subaward_awarding_sub_tier_agency_c_upper', table_name='subaward')

    op.drop_index('ix_dap_piid_upper', table_name='detached_award_procurement')
    op.drop_index('ix_dap_parent_award_id_upper', table_name='detached_award_procurement')
    op.drop_index('ix_dap_awarding_sub_tier_agency_c_upper', table_name='detached_award_procurement')

    op.drop_index('ix_pafa_fain_upper', table_name='published_award_financial_assistance')

    op.drop_index('ix_ap_piid_upper', table_name='award_procurement')
    op.drop_index('ix_ap_parent_award_id_upper', table_name='award_procurement')
    op.drop_index('ix_ap_awarding_sub_tier_agency_c_upper', table_name='award_procurement')

    op.drop_index('ix_afa_fain_upper', table_name='award_financial_assistance')
github sunshine-sjd / MyFirstBlog / migrations_back / versions / 253420e18fbf_.py View on Github external
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_comment_timestamp'), table_name='comment')
    op.drop_table('comment')
    op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
    op.drop_table('posts')
    op.drop_table('follows')
    op.drop_index(op.f('ix_users_username'), table_name='users')
    op.drop_index(op.f('ix_users_email'), table_name='users')
    op.drop_table('users')
    op.drop_index(op.f('ix_roles_default'), table_name='roles')
    op.drop_table('roles')
    ### end Alembic commands ###
github fedspendingtransparency / data-act-broker-backend / dataactcore / migrations / versions / b43b300d718b_create_tables_for_certified_dabs_a_b_c_.py View on Github external
def downgrade_data_broker():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_certified_object_class_program_activity_submission_id'), table_name='certified_object_class_program_activity')
    op.drop_table('certified_object_class_program_activity')
    op.drop_index(op.f('ix_certified_award_financial_submission_id'), table_name='certified_award_financial')
    op.drop_table('certified_award_financial')
    op.drop_index(op.f('ix_certified_appropriation_submission_id'), table_name='certified_appropriation')
    op.drop_table('certified_appropriation')
    # ### end Alembic commands ###