Python alembic.op.drop_index() Examples
The following are 30
code examples of alembic.op.drop_index().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
alembic.op
, or try the search function
.
Example #1
Source File: 00027_c92e0c8632d7_more_rss_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.add_column('rss_parser_feed_name_lut', sa.Column('feed_id', sa.BigInteger(), nullable=False)) op.create_index(op.f('ix_rss_parser_feed_name_lut_feed_id'), 'rss_parser_feed_name_lut', ['feed_id'], unique=False) op.drop_index('ix_rss_parser_feed_name_lut_feed_name', table_name='rss_parser_feed_name_lut') op.drop_constraint('rss_parser_feed_name_lut_feed_netloc_feed_name_key', 'rss_parser_feed_name_lut', type_='unique') op.create_unique_constraint(None, 'rss_parser_feed_name_lut', ['feed_netloc', 'feed_id']) op.drop_constraint('rss_parser_feed_name_lut_feed_name_fkey', 'rss_parser_feed_name_lut', type_='foreignkey') op.create_foreign_key(None, 'rss_parser_feed_name_lut', 'rss_parser_funcs', ['feed_id'], ['id']) op.drop_column('rss_parser_feed_name_lut', 'feed_name') op.add_column('rss_parser_feed_name_lut_version', sa.Column('feed_id', sa.BigInteger(), autoincrement=False, nullable=True)) op.create_index(op.f('ix_rss_parser_feed_name_lut_version_feed_id'), 'rss_parser_feed_name_lut_version', ['feed_id'], unique=False) op.drop_index('ix_rss_parser_feed_name_lut_version_feed_name', table_name='rss_parser_feed_name_lut_version') op.drop_column('rss_parser_feed_name_lut_version', 'feed_name') op.alter_column('rss_parser_funcs', 'func', existing_type=sa.TEXT(), nullable=True) ### end Alembic commands ###
Example #2
Source File: 513164749de4_add_cancelled_to_kernelstatus.py From backend.ai-manager with GNU Lesser General Public License v3.0 | 6 votes |
def downgrade(): op.drop_index('ix_kernels_unique_sess_token', table_name='kernels') conn = op.get_bind() conn.execute('ALTER TYPE kernelstatus RENAME TO kernelstatus_new;') kernelstatus_old.create(conn) conn.execute(textwrap.dedent('''\ ALTER TABLE kernels ALTER COLUMN "status" DROP DEFAULT, ALTER COLUMN "status" TYPE kernelstatus USING ( CASE "status"::text WHEN 'CANCELLED' THEN 'TERMINATED' ELSE "status"::text END )::kernelstatus, ALTER COLUMN "status" SET DEFAULT 'PREPARING'::kernelstatus; DROP TYPE kernelstatus_new; ''')) op.create_index( 'ix_kernels_unique_sess_token', 'kernels', ['access_key', 'sess_id'], unique=True, postgresql_where=sa.text( "status != 'TERMINATED' and role = 'master'" ))
Example #3
Source File: 0f3bc98edaa0_more_status.py From backend.ai-manager with GNU Lesser General Public License v3.0 | 6 votes |
def downgrade(): op.drop_column('kernels', 'stdout_port') op.drop_column('kernels', 'stdin_port') op.drop_column('kernels', 'repl_out_port') op.drop_column('kernels', 'repl_in_port') op.drop_column('kernels', 'mem_slot') op.drop_column('kernels', 'gpu_slot') op.drop_column('kernels', 'cpu_slot') op.drop_column('kernels', 'agent_addr') op.drop_index(op.f('ix_agents_status'), table_name='agents') op.drop_column('agents', 'status') op.drop_column('agents', 'lost_at') op.alter_column('kernels', column_name='status', type_=sa.String(length=64)) op.add_column('kernels', sa.Column('allocated_cores', sa.ARRAY(sa.Integer), nullable=True)) op.drop_column('kernels', 'cpu_set') op.drop_column('kernels', 'gpu_set') agentstatus.drop(op.get_bind()) kernelstatus.drop(op.get_bind())
Example #4
Source File: 9a91532c8534_add_scaling_group.py From backend.ai-manager with GNU Lesser General Public License v3.0 | 6 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_constraint(op.f('fk_kernels_scaling_group_scaling_groups'), 'kernels', type_='foreignkey') op.drop_index(op.f('ix_kernels_scaling_group'), table_name='kernels') op.drop_column('kernels', 'scaling_group') op.drop_constraint(op.f('fk_agents_scaling_group_scaling_groups'), 'agents', type_='foreignkey') op.drop_index(op.f('ix_agents_scaling_group'), table_name='agents') op.drop_column('agents', 'scaling_group') op.drop_index(op.f('ix_sgroups_for_keypairs_scaling_group'), table_name='sgroups_for_keypairs') op.drop_index(op.f('ix_sgroups_for_keypairs_access_key'), table_name='sgroups_for_keypairs') op.drop_table('sgroups_for_keypairs') op.drop_index(op.f('ix_sgroups_for_groups_scaling_group'), table_name='sgroups_for_groups') op.drop_index(op.f('ix_sgroups_for_groups_group'), table_name='sgroups_for_groups') op.drop_table('sgroups_for_groups') op.drop_index(op.f('ix_sgroups_for_domains_scaling_group'), table_name='sgroups_for_domains') op.drop_index(op.f('ix_sgroups_for_domains_domain'), table_name='sgroups_for_domains') op.drop_table('sgroups_for_domains') op.drop_index(op.f('ix_scaling_groups_is_active'), table_name='scaling_groups') op.drop_table('scaling_groups') # ### end Alembic commands ###
Example #5
Source File: 19e8725e0581_.py From gitlab-tools with GNU General Public License v3.0 | 6 votes |
def downgrade(): bind = op.get_bind() session = Session(bind=bind) # ### commands auto generated by Alembic - please adjust! ### op.add_column('pull_mirror', sa.Column('gitlab_id', sa.INTEGER(), nullable=True)) for pull_mirror in session.query(PullMirror): pull_mirror.gitlab_id = pull_mirror.project.gitlab_id session.add(pull_mirror) session.commit() op.drop_constraint(None, 'pull_mirror', type_='foreignkey') op.drop_index(op.f('ix_pull_mirror_project_id'), table_name='pull_mirror') op.drop_column('pull_mirror', 'project_id') op.drop_index(op.f('ix_push_mirror_user_id'), table_name='push_mirror') op.drop_index(op.f('ix_push_mirror_project_id'), table_name='push_mirror') op.drop_table('push_mirror') op.drop_table('project') # ### end Alembic commands ###
Example #6
Source File: e44e075decdf_.py From SempoBlockchain with GNU General Public License v3.0 | 6 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column('user', 'primary_blockchain_address') op.drop_column('user', 'is_public') op.add_column('transfer_account', sa.Column('balance', sa.BIGINT(), autoincrement=False, nullable=True)) op.drop_constraint(None, 'transfer_account', type_='foreignkey') op.drop_column('transfer_account', 'is_public') op.drop_column('transfer_account', 'exchange_contract_id') op.drop_column('transfer_account', '_balance_wei') op.drop_column('email_whitelist', 'is_public') op.add_column('credit_transfer', sa.Column('transfer_amount', sa.INTEGER(), autoincrement=False, nullable=True)) op.drop_column('credit_transfer', 'is_public') op.drop_column('credit_transfer', '_transfer_amount_wei') op.drop_column('blockchain_address', 'is_public') op.drop_table('exchange_contract_token_association_table') op.drop_index(op.f('ix_exchange_contract_contract_registry_blockchain_address'), table_name='exchange_contract') op.drop_index(op.f('ix_exchange_contract_blockchain_address'), table_name='exchange_contract') op.drop_table('exchange_contract') op.drop_table('exchange') # ### end Alembic commands ###
Example #7
Source File: d4841aeeb072_.py From gitlab-tools with GNU General Public License v3.0 | 6 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('task_result', sa.Column('traceback', sa.TEXT(), autoincrement=False, nullable=True)) op.add_column('task_result', sa.Column('task_id', sa.VARCHAR(length=155), autoincrement=False, nullable=True)) op.add_column('task_result', sa.Column('date_done', postgresql.TIMESTAMP(), autoincrement=False, nullable=True)) op.add_column('task_result', sa.Column('status', sa.VARCHAR(length=50), autoincrement=False, nullable=True)) op.add_column('task_result', sa.Column('result', postgresql.BYTEA(), autoincrement=False, nullable=True)) op.drop_constraint(None, 'task_result', type_='foreignkey') op.create_unique_constraint('task_result_task_id_key', 'task_result', ['task_id']) op.drop_index(op.f('ix_task_result_celery_taskmeta_id'), table_name='task_result') op.drop_column('task_result', 'celery_taskmeta_id') op.drop_table('celery_tasksetmeta') op.drop_table('celery_taskmeta') # ### end Alembic commands ###
Example #8
Source File: 00027_c92e0c8632d7_more_rss_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.alter_column('rss_parser_funcs', 'func', existing_type=sa.TEXT(), nullable=False) op.add_column('rss_parser_feed_name_lut_version', sa.Column('feed_name', sa.TEXT(), autoincrement=False, nullable=True)) op.create_index('ix_rss_parser_feed_name_lut_version_feed_name', 'rss_parser_feed_name_lut_version', ['feed_name'], unique=False) op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_feed_id'), table_name='rss_parser_feed_name_lut_version') op.drop_column('rss_parser_feed_name_lut_version', 'feed_id') op.add_column('rss_parser_feed_name_lut', sa.Column('feed_name', sa.TEXT(), autoincrement=False, nullable=False)) op.drop_constraint(None, 'rss_parser_feed_name_lut', type_='foreignkey') op.create_foreign_key('rss_parser_feed_name_lut_feed_name_fkey', 'rss_parser_feed_name_lut', 'rss_parser_funcs', ['feed_name'], ['feed_name']) op.drop_constraint(None, 'rss_parser_feed_name_lut', type_='unique') op.create_unique_constraint('rss_parser_feed_name_lut_feed_netloc_feed_name_key', 'rss_parser_feed_name_lut', ['feed_netloc', 'feed_name']) op.create_index('ix_rss_parser_feed_name_lut_feed_name', 'rss_parser_feed_name_lut', ['feed_name'], unique=False) op.drop_index(op.f('ix_rss_parser_feed_name_lut_feed_id'), table_name='rss_parser_feed_name_lut') op.drop_column('rss_parser_feed_name_lut', 'feed_id') ### end Alembic commands ###
Example #9
Source File: a54c57ada3f5_removes_useless_indexes.py From gnocchi with Apache License 2.0 | 6 votes |
def upgrade(): bind = op.get_bind() # NOTE(sileht): mysql can't delete an index on a foreign key # even this one is not the index used by the foreign key itself... # In our case we have two indexes fk_resource_history_id_resource_id and # and ix_resource_history_id, we want to delete only the second, but mysql # can't do that with a simple DROP INDEX ix_resource_history_id... # so we have to remove the constraint and put it back... if bind.engine.name == "mysql": op.drop_constraint("fk_resource_history_id_resource_id", type_="foreignkey", table_name="resource_history") for table, colname in resource_tables + history_tables + other_tables: op.drop_index("ix_%s_%s" % (table, colname), table_name=table) if bind.engine.name == "mysql": op.create_foreign_key("fk_resource_history_id_resource_id", "resource_history", "resource", ["id"], ["id"], ondelete="CASCADE")
Example #10
Source File: 00005_f6cfe0a6836c_new_versioning_thing.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_web_pages_version_url'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_type'), table_name='web_pages_version') op.drop_index('ix_web_pages_version_tsv_content', table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_transaction_id'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_state'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_priority'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_operation_type'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_netloc'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_ignoreuntiltime'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_id'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_end_transaction_id'), table_name='web_pages_version') op.drop_index(op.f('ix_web_pages_version_distance'), table_name='web_pages_version') op.drop_table('web_pages_version') op.drop_table('transaction') ### end Alembic commands ###
Example #11
Source File: 02cb3cfad5e8_v1_0.py From Simpleblog with MIT License | 6 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_likes_timestamp'), table_name='likes') op.drop_table('likes') op.drop_index(op.f('ix_comments_timestamp'), table_name='comments') op.drop_table('comments') 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_conversations_timestamp'), table_name='conversations') op.drop_table('conversations') op.drop_index(op.f('ix_users_nickname'), 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') op.drop_index(op.f('ix_admin_timestamp'), table_name='admin') op.drop_table('admin') # ### end Alembic commands ###
Example #12
Source File: 00007_cb674b790e4a_more_nu_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.add_column('nu_outbound_wrappers', sa.Column('target_url', sa.TEXT(), autoincrement=False, nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('link_url', sa.TEXT(), autoincrement=False, nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('container_page', sa.TEXT(), autoincrement=False, nullable=True)) op.create_index('ix_nu_outbound_wrappers_link_url', 'nu_outbound_wrappers', ['link_url'], unique=False) op.create_index('ix_nu_outbound_wrappers_container_page', 'nu_outbound_wrappers', ['container_page'], unique=False) op.drop_index(op.f('ix_nu_outbound_wrappers_seriesname'), table_name='nu_outbound_wrappers') op.drop_index(op.f('ix_nu_outbound_wrappers_groupinfo'), table_name='nu_outbound_wrappers') op.drop_index(op.f('ix_nu_outbound_wrappers_client_key'), table_name='nu_outbound_wrappers') op.drop_index(op.f('ix_nu_outbound_wrappers_client_id'), table_name='nu_outbound_wrappers') op.drop_column('nu_outbound_wrappers', 'seriesname') op.drop_column('nu_outbound_wrappers', 'releaseinfo') op.drop_column('nu_outbound_wrappers', 'referrer') op.drop_column('nu_outbound_wrappers', 'outbound_wrapper') op.drop_column('nu_outbound_wrappers', 'groupinfo') op.drop_column('nu_outbound_wrappers', 'client_key') op.drop_column('nu_outbound_wrappers', 'client_id') op.drop_column('nu_outbound_wrappers', 'actual_target') ### end Alembic commands ###
Example #13
Source File: 1083bb6545c9_.py From website with MIT License | 6 votes |
def downgrade(): op.create_table( "project_members", sa.Column("user_id", sa.INTEGER(), autoincrement=False, nullable=True), sa.Column("project_id", sa.INTEGER(), autoincrement=False, nullable=True), sa.Column( "date_joined", postgresql.TIMESTAMP(), autoincrement=False, nullable=True ), sa.Column("is_lead", sa.BOOLEAN(), autoincrement=False, nullable=False), sa.ForeignKeyConstraint( ["project_id"], ["projects.id"], name="project_members_project_id_fkey" ), sa.ForeignKeyConstraint( ["user_id"], ["users.id"], name="project_members_user_id_fkey" ), ) op.drop_index( op.f("ix_project_memberships_is_lead"), table_name="project_memberships" ) op.drop_table("project_memberships")
Example #14
Source File: 00007_cb674b790e4a_more_nu_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.add_column('nu_outbound_wrappers', sa.Column('actual_target', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('client_id', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('client_key', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('groupinfo', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('outbound_wrapper', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('referrer', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('releaseinfo', sa.Text(), nullable=True)) op.add_column('nu_outbound_wrappers', sa.Column('seriesname', sa.Text(), nullable=True)) op.create_index(op.f('ix_nu_outbound_wrappers_client_id'), 'nu_outbound_wrappers', ['client_id'], unique=False) op.create_index(op.f('ix_nu_outbound_wrappers_client_key'), 'nu_outbound_wrappers', ['client_key'], unique=False) op.create_index(op.f('ix_nu_outbound_wrappers_groupinfo'), 'nu_outbound_wrappers', ['groupinfo'], unique=False) op.create_index(op.f('ix_nu_outbound_wrappers_seriesname'), 'nu_outbound_wrappers', ['seriesname'], unique=False) op.drop_index('ix_nu_outbound_wrappers_container_page', table_name='nu_outbound_wrappers') op.drop_index('ix_nu_outbound_wrappers_link_url', table_name='nu_outbound_wrappers') op.drop_column('nu_outbound_wrappers', 'container_page') op.drop_column('nu_outbound_wrappers', 'link_url') op.drop_column('nu_outbound_wrappers', 'target_url') ### end Alembic commands ###
Example #15
Source File: 56c000fd001d_.py From website with MIT License | 6 votes |
def downgrade(): op.add_column( "projects", sa.Column("client_id", postgresql.UUID(), autoincrement=False, nullable=True), ) op.add_column( "projects", sa.Column("secret_key", postgresql.UUID(), autoincrement=False, nullable=True), ) op.drop_index( "release_username_password_is_active_idx", table_name="project_credentials" ) op.drop_index( op.f("ix_project_credentials_is_active"), table_name="project_credentials" ) op.drop_table("project_credentials")
Example #16
Source File: 00026_34f427187628_add_rss_bits.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_rss_parser_feed_name_lut_id'), table_name='rss_parser_feed_name_lut') op.drop_index(op.f('ix_rss_parser_feed_name_lut_feed_netloc'), table_name='rss_parser_feed_name_lut') op.drop_index(op.f('ix_rss_parser_feed_name_lut_feed_name'), table_name='rss_parser_feed_name_lut') op.drop_table('rss_parser_feed_name_lut') op.drop_index(op.f('ix_rss_parser_funcs_version_transaction_id'), table_name='rss_parser_funcs_version') op.drop_index(op.f('ix_rss_parser_funcs_version_operation_type'), table_name='rss_parser_funcs_version') op.drop_index(op.f('ix_rss_parser_funcs_version_id'), table_name='rss_parser_funcs_version') op.drop_index(op.f('ix_rss_parser_funcs_version_feed_name'), table_name='rss_parser_funcs_version') op.drop_index(op.f('ix_rss_parser_funcs_version_end_transaction_id'), table_name='rss_parser_funcs_version') op.drop_table('rss_parser_funcs_version') op.drop_index(op.f('ix_rss_parser_funcs_id'), table_name='rss_parser_funcs') op.drop_index(op.f('ix_rss_parser_funcs_feed_name'), table_name='rss_parser_funcs') op.drop_table('rss_parser_funcs') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_transaction_id'), table_name='rss_parser_feed_name_lut_version') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_operation_type'), table_name='rss_parser_feed_name_lut_version') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_id'), table_name='rss_parser_feed_name_lut_version') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_feed_netloc'), table_name='rss_parser_feed_name_lut_version') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_feed_name'), table_name='rss_parser_feed_name_lut_version') op.drop_index(op.f('ix_rss_parser_feed_name_lut_version_end_transaction_id'), table_name='rss_parser_feed_name_lut_version') op.drop_table('rss_parser_feed_name_lut_version') ### end Alembic commands ###
Example #17
Source File: 334ff08dacf9_.py From SempoBlockchain with GNU General Public License v3.0 | 5 votes |
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column('blockchain_wallet', sa.Column('last_topup_task_id', sa.Integer(), nullable=True)) op.create_index(op.f('ix_blockchain_wallet_address'), 'blockchain_wallet', ['address'], unique=True) op.drop_index('ix_blockchain_address_address', table_name='blockchain_wallet') # ### end Alembic commands ###
Example #18
Source File: b72321d58252_.py From website with MIT License | 5 votes |
def downgrade(): op.drop_index(op.f("ix_project_uploads_notified_at"), table_name="project_uploads") op.drop_column("project_uploads", "ordering") op.drop_column("project_uploads", "notified_at")
Example #19
Source File: 334ff08dacf9_.py From SempoBlockchain with GNU General Public License v3.0 | 5 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_index('ix_blockchain_address_address', 'blockchain_wallet', ['address'], unique=True) op.drop_index(op.f('ix_blockchain_wallet_address'), table_name='blockchain_wallet') op.drop_column('blockchain_wallet', 'last_topup_task_id') # ### end Alembic commands ###
Example #20
Source File: bcabc2834c03_.py From SempoBlockchain with GNU General Public License v3.0 | 5 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_blockchain_task_uuid'), table_name='blockchain_task') op.drop_column('blockchain_task', 'uuid') # ### end Alembic commands ###
Example #21
Source File: 00013_d37cc90c5586_cookie_database_system_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index('ua_user_agent', table_name='web_cookie_db') op.drop_index(op.f('ix_web_cookie_db_id'), table_name='web_cookie_db') op.drop_table('web_cookie_db') ### end Alembic commands ###
Example #22
Source File: 00006_52ecc22110c4_.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_index('web_pages_state_netloc_idx', 'web_pages', ['state', 'netloc'], unique=False) op.drop_index(op.f('ix_nu_outbound_wrappers_link_url'), table_name='nu_outbound_wrappers') op.drop_index(op.f('ix_nu_outbound_wrappers_container_page'), table_name='nu_outbound_wrappers') op.drop_table('nu_outbound_wrappers') ### end Alembic commands ###
Example #23
Source File: 00043_b21ea54b22a2_adding_table_for_tracking_when_.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_version_checked_table_url'), table_name='version_checked_table') op.drop_index(op.f('ix_version_checked_table_checked'), table_name='version_checked_table') op.drop_table('version_checked_table') # ### end Alembic commands ###
Example #24
Source File: 00023_1b4006c4f120_more_validation.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_nu_release_item_validated_on'), table_name='nu_release_item') op.drop_index(op.f('ix_nu_release_item_validated'), table_name='nu_release_item') op.drop_index(op.f('ix_nu_release_item_reviewed'), table_name='nu_release_item') op.drop_column('nu_release_item', 'reviewed') ### end Alembic commands ###
Example #25
Source File: 00017_26a8e4006aea_.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_index('web_pages_file', 'web_pages', ['file'], unique=False) op.create_index('nu_outbound_wrappers_released_on_idx', 'nu_outbound_wrappers', ['released_on'], unique=False) op.drop_index(op.f('ix_nu_outbound_wrappers_released_on'), table_name='nu_outbound_wrappers') op.drop_index(op.f('ix_feed_pages_type'), table_name='feed_pages') op.drop_index(op.f('ix_feed_pages_feedurl'), table_name='feed_pages') op.drop_index(op.f('ix_feed_pages_contenturl'), table_name='feed_pages') ### end Alembic commands ###
Example #26
Source File: 00017_26a8e4006aea_.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_index(op.f('ix_feed_pages_contenturl'), 'feed_pages', ['contenturl'], unique=False) op.create_index(op.f('ix_feed_pages_feedurl'), 'feed_pages', ['feedurl'], unique=False) op.create_index(op.f('ix_feed_pages_type'), 'feed_pages', ['type'], unique=False) op.create_index(op.f('ix_nu_outbound_wrappers_released_on'), 'nu_outbound_wrappers', ['released_on'], unique=False) op.drop_index('nu_outbound_wrappers_released_on_idx', table_name='nu_outbound_wrappers') op.drop_index('web_pages_file', table_name='web_pages') ### end Alembic commands ###
Example #27
Source File: 00033_53fab90468f4_.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_feed_post_meta_contentid'), table_name='feed_post_meta') op.drop_table('feed_post_meta') ### end Alembic commands ###
Example #28
Source File: 2020-01-20_669e9df34ea7_add_new_netloc_tracking_table.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_seen_netloc_tracker_netloc'), table_name='seen_netloc_tracker') op.drop_table('seen_netloc_tracker') # ### end Alembic commands ###
Example #29
Source File: 00028_9d03d8bba40e_moarrrrrrrrrrr_rss_stuff.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint(None, 'feed_pages', type_='foreignkey') op.drop_index(op.f('ix_feed_pages_feed_id'), table_name='feed_pages') op.drop_column('feed_pages', 'feed_id') ### end Alembic commands ###
Example #30
Source File: 00046_4f22490b9071_experimenting_with_versioning_modes.py From ReadableWebProxy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.execute("SET statement_timeout TO 14400000;") op.drop_column('raw_web_pages_version', 'end_transaction_id') op.drop_index('ix_rss_parser_feed_name_lut_version_end_transaction_id', table_name='rss_parser_feed_name_lut_version') op.drop_column('rss_parser_feed_name_lut_version', 'end_transaction_id') op.drop_index('ix_rss_parser_funcs_version_end_transaction_id', table_name='rss_parser_funcs_version') op.drop_column('rss_parser_funcs_version', 'end_transaction_id') op.drop_column('web_pages_version', 'end_transaction_id') # ### end Alembic commands ###