quoting leaking into index names due to DDL rule consult

Issue #472 resolved
Michael Bayer
repo owner created an issue

e.g. due to #421:

diff --git a/tests/test_autogen_indexes.py b/tests/test_autogen_indexes.py
index e426a67..6813b92 100644
--- a/tests/test_autogen_indexes.py
+++ b/tests/test_autogen_indexes.py
@@ -557,6 +557,15 @@ class AutogenerateUniqueIndexTest(AutogenFixtureTest, TestBase):

         eq_(diffs, [])

+    def test_unchanged_case_sensitive_idx(self):
+        m1 = MetaData()
+        m2 = MetaData()
+        t1 = Table('add_ix', m1, Column('regNumber', String(50), index=True))
+        t2 = Table('add_ix', m2, Column('regNumber', String(50), index=True))
+        diffs = self._fixture(m1, m2)
+
+        eq_(diffs, [])
+

 class PGUniqueIndexTest(AutogenerateUniqueIndexTest):
     reports_unnamed_constraints = True
AssertionError: [('add_index', Index('ix_add_ix_regNumber', Column('regNumber', String(length=50), table=<add_ix>))), ('remove_index', Index('ix_add_ix_regNumber', Column('regNumber', VARCHAR(length=50), table=<add_ix>)))] != []

Comments (2)

  1. Michael Bayer reporter

    Disable index quoting when applying truncated DDL rules

    Fixed regression caused by 🎫421 which would cause case-sensitive quoting rules to interfere with the comparison logic for index names, thus causing indexes to show as added for indexes that have case-sensitive names.

    Change-Id: Ibd73456109cc95362503576f379acd9f4f0d6d65 Fixes: #472

    → <<cset 6307f4d3e1ce>>

  2. Log in to comment