Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def schema_upgrades():
"""schema upgrade migrations go here."""
op.drop_table('users')
op.drop_table('payload_dependencies')
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 ###
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')
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 ###
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 ###
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 ###
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')
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 ###
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 ###
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 ###