summaryrefslogtreecommitdiff
path: root/tests/test_oracle.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-03-19 13:15:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-03-19 13:15:48 -0400
commitd2f4470c51a9c2a7d2586a9cab00162dcc90667f (patch)
tree9f5351749f30f2837150dbbf185f82da8e132409 /tests/test_oracle.py
parent4f351a6ca8a6b5fe6718203226805f4e1a02a2db (diff)
downloadalembic-d2f4470c51a9c2a7d2586a9cab00162dcc90667f.tar.gz
Don't include schema in "to" portion of Oracle RENAME table
Fixed issue in Oracle backend where a table RENAME with a schema-qualified name would include the schema in the "to" portion, which is rejected by Oracle. Change-Id: I8110a58bea20ebe48bfca0877da6bd8e0abd17c2 Fixes: #670
Diffstat (limited to 'tests/test_oracle.py')
-rw-r--r--tests/test_oracle.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_oracle.py b/tests/test_oracle.py
index 537d8c6..b2e704f 100644
--- a/tests/test_oracle.py
+++ b/tests/test_oracle.py
@@ -80,6 +80,16 @@ class OpTest(TestBase):
"INTEGER GENERATED ALWAYS AS (foo * 5)"
)
+ def test_alter_table_rename_oracle(self):
+ context = op_fixture("oracle")
+ op.rename_table("s", "t")
+ context.assert_("ALTER TABLE s RENAME TO t")
+
+ def test_alter_table_rename_schema_oracle(self):
+ context = op_fixture("oracle")
+ op.rename_table("s", "t", schema="myowner")
+ context.assert_("ALTER TABLE myowner.s RENAME TO t")
+
def test_alter_column_rename_oracle(self):
context = op_fixture("oracle")
op.alter_column("t", "c", name="x")