How to use the alembic.op.drop_table 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 cmdmnt / commandment / commandment / alembic / versions / 3fb4a904979c_general_cleanup.py View on Github external
def schema_upgrades():
    """schema upgrade migrations go here."""
    op.drop_table('users')
    op.drop_table('payload_dependencies')
github bcgov / queue-management / api / migrations / versions / c1b93103c752_.py View on Github external
op.drop_table('invigilator')
    op.drop_table('csr')
    op.drop_table('citizen')
    op.drop_table('appointment')
    op.drop_table('service_metadata')
    op.drop_table('role_permission')
    op.drop_table('office')
    op.drop_table('timezone')
    op.drop_table('srstate')
    op.drop_table('smartboard')
    op.drop_table('service')
    op.drop_table('role')
    op.drop_table('permission')
    op.drop_table('periodstate')
    op.drop_table('metadata')
    op.drop_table('examtype')
    op.drop_table('csrstate')
    op.drop_table('counter')
    op.drop_table('citizenstate')
    op.drop_table('channel')
    # ### end Alembic commands ###
github Weasyl / weasyl / libweasyl / libweasyl / alembic / versions / abac1922735d_squash_revisions_for_publication.py View on Github external
def downgrade():
    op.drop_table('reportcomment')
    op.drop_table('report')
    op.drop_table('tag_updates')
    op.drop_index('ind_submission_media_links_submitid', table_name='submission_media_links')
    op.drop_index('ind_submission_media_links_mediaid', table_name='submission_media_links')
    op.drop_table('submission_media_links')
    op.drop_index('ind_searchmapsubmit_targetid', table_name='searchmapsubmit')
    op.drop_index('ind_searchmapsubmit_tagid', table_name='searchmapsubmit')
    op.drop_table('searchmapsubmit')
    op.drop_table('google_doc_embeds')
    op.drop_index(op.f('ix_comments_target_user'), table_name='comments')
    op.drop_index(op.f('ix_comments_target_sub'), table_name='comments')
    op.drop_table('comments')
    op.drop_index('ind_collection_userid', table_name='collection')
    op.drop_table('collection')
    op.drop_index('ind_submission_userid_unixtime', table_name='submission')
    op.drop_index('ind_submission_userid_folderid', table_name='submission')
    op.drop_index('ind_submission_userid', table_name='submission')
    op.drop_index('ind_submission_folderid', table_name='submission')
    op.drop_table('submission')
    op.drop_index('ind_searchmapjournal_targetid', table_name='searchmapjournal')
    op.drop_index('ind_searchmapjournal_tagid', table_name='searchmapjournal')
    op.drop_table('searchmapjournal')
    op.drop_index('ind_searchmapchar_targetid', table_name='searchmapchar')
    op.drop_index('ind_searchmapchar_tagid', table_name='searchmapchar')
    op.drop_table('searchmapchar')
    op.drop_table('oauth_bearer_tokens')
    op.drop_index('ind_journalcomment_targetid_settings', table_name='journalcomment')
    op.drop_index('ind_journalcomment_targetid', table_name='journalcomment')
    op.drop_index('ind_journalcomment_settings', table_name='journalcomment')
    op.drop_table('journalcomment')
github cernanalysispreservation / analysispreservation.cern.ch / cap / alembic / a85d38b8e3e9_replace_reana_with_workflows_and_init_.py View on Github external
sa.Column('params',
                  postgresql.JSON(astext_type=sa.Text()),
                  autoincrement=False,
                  nullable=True),
        sa.Column('output',
                  postgresql.JSON(astext_type=sa.Text()),
                  autoincrement=False,
                  nullable=True),
        sa.ForeignKeyConstraint(['record_id'], [u'records_metadata.id'],
                                name=u'fk_reana_record_id_records_metadata'),
        sa.ForeignKeyConstraint(['user_id'], [u'accounts_user.id'],
                                name=u'fk_reana_user_id_accounts_user'),
        sa.PrimaryKeyConstraint('id', name=u'pk_reana'),
        sa.UniqueConstraint('reana_id', name=u'uq_reana_reana_id'))

    op.drop_table('reana_workflows')

    service_enum.drop(op.get_bind())
    # ### end Alembic commands ###
github andela / mrm_api / alembic / versions / 5189113ab5b6_initial_migration.py View on Github external
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('resources')
    op.drop_table('rooms')
    op.drop_table('floors')
    op.drop_table('users_roles')
    op.drop_table('blocks')
    op.drop_table('users')
    op.drop_table('roles')
    op.drop_table('locations')
    # ### end Alembic commands ###
github briancappello / flask-react-spa / backend / security / migrations / 8036f244db77_create_user_and_role.py View on Github external
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('user_role')
    op.drop_index(op.f('ix_user_username'), table_name='user')
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_role_name'), table_name='role')
    op.drop_table('role')
    # ### end Alembic commands ###
github corpus-christi / corpus-christi / api / migrations / versions / 35160eba026e_.py View on Github external
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('groups_attendance')
    op.drop_table('groups_member')
    op.drop_table('groups_meeting')
    op.drop_table('groups_group')
    op.drop_table('people_manager')
    op.drop_table('courses_class_attendance')
    op.drop_table('account_role')
    op.drop_table('people_person_attributes')
    op.drop_table('people_account')
    op.drop_table('images_imageevent')
    op.drop_table('events_teammember')
    op.drop_table('events_eventteam')
    op.drop_table('events_eventperson')
    op.drop_table('events_eventparticipant')
    op.drop_table('events_eventasset')
    op.drop_table('courses_students')
    op.drop_table('courses_diploma_awarded')
    op.drop_table('courses_course_completion')
github okpy / ok / migrations / versions / 94d2839daa08_.py View on Github external
op.drop_index(op.f('ix_grading_task_grader_id'), table_name='grading_task')
    op.drop_index(op.f('ix_grading_task_assignment_id'), table_name='grading_task')
    op.drop_table('grading_task')
    op.drop_index(op.f('ix_score_backup_id'), table_name='score')
    op.drop_table('score')
    op.drop_index(op.f('ix_message_kind'), table_name='message')
    op.drop_index(op.f('ix_message_backup_id'), table_name='message')
    op.drop_table('message')
    op.drop_index(op.f('ix_group_member_user_id'), table_name='group_member')
    op.drop_index(op.f('ix_group_member_status'), table_name='group_member')
    op.drop_index(op.f('ix_group_member_group_id'), table_name='group_member')
    op.drop_table('group_member')
    op.drop_index(op.f('ix_comment_backup_id'), table_name='comment')
    op.drop_table('comment')
    op.drop_table('group')
    op.drop_table('backup')
    op.drop_index(op.f('ix_enrollment_user_id'), table_name='enrollment')
    op.drop_index(op.f('ix_enrollment_course_id'), table_name='enrollment')
    op.drop_table('enrollment')
    op.drop_index(op.f('ix_assignment_name'), table_name='assignment')
    op.drop_index(op.f('ix_assignment_course_id'), table_name='assignment')
    op.drop_table('assignment')
    op.drop_table('group_action')
    op.drop_index(op.f('ix_course_offering'), table_name='course')
    op.drop_table('course')
    op.drop_index(op.f('ix_version_name'), table_name='version')
    op.drop_table('version')
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    ### end Alembic commands ###
github okpy / ok / migrations / versions / ef84eeb16962_import_from_app_engine_datastore.py View on Github external
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_assignment_name'), table_name='assignment')
    op.drop_index(op.f('ix_assignment_course_id'), table_name='assignment')
    op.drop_table('assignment')
    op.drop_table('group_action')
    op.drop_index(op.f('ix_course_offering'), table_name='course')
    op.drop_table('course')
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_table('submission')
    op.drop_index(op.f('ix_message_kind'), table_name='message')
    op.drop_index(op.f('ix_message_backup_id'), table_name='message')
    op.drop_table('message')
    op.drop_index(op.f('ix_group_member_user_id'), table_name='group_member')
    op.drop_index(op.f('ix_group_member_status'), table_name='group_member')
    op.drop_index(op.f('ix_group_member_group_id'), table_name='group_member')
    op.drop_table('group_member')
    op.drop_table('group')
    op.drop_table('final_submission')
    op.drop_index(op.f('ix_enrollment_user_id'), table_name='enrollment')
    op.drop_index(op.f('ix_enrollment_course_id'), table_name='enrollment')
    op.drop_table('enrollment')
    op.drop_table('backup')
    ### end Alembic commands ###
github bcgov / queue-management / api / migrations / versions / c1b93103c752_.py View on Github external
op.drop_table('period')
    op.drop_table('exam')
    op.drop_table('servicereq')
    op.drop_table('booking')
    op.drop_table('room')
    op.drop_table('office_service')
    op.drop_table('office_quick_list')
    op.drop_table('office_counter')
    op.drop_table('office_back_office_list')
    op.drop_table('invigilator')
    op.drop_table('csr')
    op.drop_table('citizen')
    op.drop_table('appointment')
    op.drop_table('service_metadata')
    op.drop_table('role_permission')
    op.drop_table('office')
    op.drop_table('timezone')
    op.drop_table('srstate')
    op.drop_table('smartboard')
    op.drop_table('service')
    op.drop_table('role')
    op.drop_table('permission')
    op.drop_table('periodstate')
    op.drop_table('metadata')
    op.drop_table('examtype')
    op.drop_table('csrstate')
    op.drop_table('counter')
    op.drop_table('citizenstate')
    op.drop_table('channel')
    # ### end Alembic commands ###