summaryrefslogtreecommitdiff
path: root/test/dialect/test_oracle.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-09-30 20:00:46 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2012-09-30 20:00:46 +0000
commitbba1d01b26adb2db5b3c3fc41b94834cec5c73fc (patch)
tree8d8b78427343fe0afae089602adbea4b8bde60e2 /test/dialect/test_oracle.py
parent0c3e2b49b99655edba28230a70622982faba7185 (diff)
downloadsqlalchemy-bba1d01b26adb2db5b3c3fc41b94834cec5c73fc.tar.gz
- [bug] The CreateIndex construct in Oracle
will now schema-qualify the name of the index to be that of the parent table. Previously this name was omitted which apparently creates the index in the default schema, rather than that of the table.
Diffstat (limited to 'test/dialect/test_oracle.py')
-rw-r--r--test/dialect/test_oracle.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py
index 66b27a12a..edb7be840 100644
--- a/test/dialect/test_oracle.py
+++ b/test/dialect/test_oracle.py
@@ -2,7 +2,7 @@
from sqlalchemy.testing import eq_
from sqlalchemy import *
-from sqlalchemy import types as sqltypes, exc
+from sqlalchemy import types as sqltypes, exc, schema
from sqlalchemy.sql import table, column
from sqlalchemy.testing import fixtures, AssertsExecutionResults, AssertsCompiledSQL
from sqlalchemy import testing
@@ -523,6 +523,16 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
]:
self.assert_compile(fn, expected)
+ def test_create_index_alt_schema(self):
+ m = MetaData()
+ t1 = Table('foo', m,
+ Column('x', Integer),
+ schema="alt_schema"
+ )
+ self.assert_compile(
+ schema.CreateIndex(Index("bar", t1.c.x)),
+ "CREATE INDEX alt_schema.bar ON alt_schema.foo (x)"
+ )
class CompatFlagsTest(fixtures.TestBase, AssertsCompiledSQL):
__only_on__ = 'oracle'