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 ###
python类drop_index()的实例源码
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')
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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 ###
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')
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 ###
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 ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_index('ix_comments_timestamp', 'comments')
op.drop_table('comments')
### end Alembic commands ###
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 ###