Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quoting leaking into index names due to DDL rule consult #472

Closed
sqlalchemy-bot opened this issue Jan 2, 2018 · 3 comments
Closed

quoting leaking into index names due to DDL rule consult #472

sqlalchemy-bot opened this issue Jan 2, 2018 · 3 comments
Labels
autogenerate - detection bug Something isn't working
Milestone

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Michael Bayer (@zzzeek)

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>)))] != []

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

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

6307f4d

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added autogenerate - detection bug Something isn't working labels Nov 27, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the fasttrack milestone Nov 27, 2018
vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019
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: sqlalchemy#472
vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019
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: sqlalchemy#472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autogenerate - detection bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant