summaryrefslogtreecommitdiff
path: root/alembic/ddl
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-05-18 10:36:13 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-05-18 10:36:13 -0400
commitc7da7f2d08d46d1b784a172eeaf76fb660effa2e (patch)
tree2b87f2b709b5cde351c4f58c540767532d4fda10 /alembic/ddl
parentfbbb669b8cd8845cd5dbdd827f8beb70fa1476bc (diff)
downloadalembic-c7da7f2d08d46d1b784a172eeaf76fb660effa2e.tar.gz
Don't use schema with second argument, SQL Server sp_rename
Repaired :meth:`.Operations.rename_table` for SQL Server when the target table is in a remote schema, the schema name is omitted from the "new name" argument. Also added some extra tests for sp_rename w/ quoting / case sensitive names. Change-Id: I411b32d0c5bba5a466c0b5d6a412c1b7541fdc95 Fixes: #429
Diffstat (limited to 'alembic/ddl')
-rw-r--r--alembic/ddl/mssql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py
index f51de33..f10c5e6 100644
--- a/alembic/ddl/mssql.py
+++ b/alembic/ddl/mssql.py
@@ -229,5 +229,5 @@ def visit_column_type(element, compiler, **kw):
def visit_rename_table(element, compiler, **kw):
return "EXEC sp_rename '%s', %s" % (
format_table_name(compiler, element.table_name, element.schema),
- format_table_name(compiler, element.new_table_name, element.schema)
+ format_table_name(compiler, element.new_table_name, None)
)