Did I find the right examples for you? yes no

All Samples(71)  |  Call(71)  |  Derive(0)  |  Import(0)
Emit an ALTER TABLE to rename a table.

:param old_table_name: old name.
:param new_table_name: new name.
:param schema: Optional schema name to operate within.

src/i/n/inbox-HEAD/migrations/versions/007_per_provider_table_split.py   inbox(Download)
 
    # Rename table, add new columns.
    op.rename_table('imapaccount', 'account')
    op.add_column('account', sa.Column('type', sa.String(16)))
 
    op.drop_table('imapaccount')
 
    op.rename_table('account', 'imapaccount')
 
    op.create_foreign_key('imapuid_ibfk_1', 'imapuid', 'imapaccount',

src/n/e/neutron-HEAD/neutron/db/migration/alembic_migrations/versions/263772d65691_cisco_db_cleanup_2.py   neutron(Download)
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return
 
    op.rename_table('credentials', 'cisco_credentials')
    op.rename_table('nexusport_bindings', 'cisco_nexusport_bindings')
    op.rename_table('qoss', 'cisco_qos_policies')
    )
 
    op.rename_table('cisco_credentials', 'credentials')
    op.rename_table('cisco_nexusport_bindings', 'nexusport_bindings')
    op.rename_table('cisco_qos_policies', 'qoss')

src/n/e/neutron-HEAD/neutron/db/migration/alembic_migrations/versions/40b0aff0302e_mlnx_initial.py   neutron(Download)
 
    op.rename_table(
        'routes',
        'subnetroutes',
    )
 
    op.rename_table(
        'subnetroutes',
        'routes',
    )

src/g/r/grano-HEAD/alembic/versions/48dd6f2e0784_.py   grano(Download)
def upgrade():
    op.rename_table('account', 'grano_account')
    op.rename_table('project', 'grano_project')
    op.rename_table('permission', 'grano_permission')
    op.rename_table('schema', 'grano_schema')
    op.rename_table('entity', 'grano_entity')

src/n/e/neutron-HEAD/neutron/db/migration/alembic_migrations/versions/3c6e57a23db4_add_multiprovider.py   neutron(Download)
 
    op.drop_table('nvp_network_bindings')
    op.rename_table('rename_nvp_network_bindings', 'nvp_network_bindings')
 
 
 
    op.drop_table('nvp_network_bindings')
    op.rename_table('rename_nvp_network_bindings', 'nvp_network_bindings')
    op.drop_table('nvp_multi_provider_networks')
 

src/i/n/inbox-HEAD/migrations/versions/022_webhooks_and_filters.py   inbox(Download)
def upgrade():
    from inbox.sqlalchemy.util import Base36UID
 
    print "Rename WebhookParameters -> Webhook"
    op.rename_table('webhookparameters', 'webhook')

src/n/e/neutron-HEAD/neutron/db/migration/alembic_migrations/versions/3d2585038b95_vmware_nsx.py   neutron(Download)
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return
 
    op.rename_table('nvp_network_bindings', 'tz_network_bindings')
    op.rename_table('nvp_multi_provider_networks', 'multi_provider_networks')
                   "RENAME TO nvp_network_bindings_binding_type;")
 
    op.rename_table('multi_provider_networks', 'nvp_multi_provider_networks')
    op.rename_table('tz_network_bindings', 'nvp_network_bindings')
 

src/s/t/stalker-0.2.7.2/alembic/versions/4664d72ce1e1_renamed_link_path_to_full_path.py   stalker(Download)
        # drop the Links table and rename Links_Temp to Links
        op.drop_table('Links')
        op.rename_table('Links_Temp', 'Links')
 
 
        # drop the Links table and rename Links_Temp to Links
        op.drop_table('Links')
        op.rename_table('Links_Temp', 'Links')
 

src/n/e/neutron-HEAD/neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py   neutron(Download)
 
    op.rename_table(
        'routes',
        'subnetroutes',
    )
 
    op.rename_table(
        'subnetroutes',
        'routes',
    )

src/c/u/cuckoo-HEAD/utils/db_migration/versions/from_0_6_to_1_1.py   cuckoo(Download)
 
            # Rename original table.
            op.rename_table("tasks", "old_tasks")
            # Drop old table.
            op.drop_table("old_tasks")
 
            # Rename original table.
            op.rename_table("tasks", "old_tasks")
            # Drop old table.
            op.drop_table("old_tasks")

  1 | 2  Next