<p dir="auto"><strong>Migrated issue, originally created by Anonymous</strong></p>
<p dir="auto">When attempting to autoload a table in an MSSQL database, the ForeignKey.references() method doesn't correctly match the table name in the metadata, and fails to match.  See the attached test case.</p>
<p dir="auto">Note that this situation arises in a real-world scenario where a given schema is created on both Oracle, Postgres, and MSSQL using another product.  Oracle and Postgres throw away the case, but MSSQL preserves it, so changing the Table definitions to match the MSSQL case doesn't fix the problem because it breaks when connecting to the Oracle and Postgres instances.</p>
<p dir="auto">I imagine this problem could be resolved a couple of ways:</p>
<ol dir="auto">
<li>When a table is autoloaded (from any dialect), copy the name of the table as the database knows it into the .name property of the table.  It's possible this will break other things including 3rd-party implementations.</li>
<li>Require the each dialect provide a method used to compare table names... and use that in ForeignKey.references().  I notice there is already significant case handling in the MSSQL dialect.  Perhaps this can be extended to address this issue.</li>
</ol>
<p dir="auto">I also suspect there may be another approach that is more appropriate.  If there is a user-side suggestion, that would be appreciated as well.</p>
<p dir="auto">I have considered a work-around whereby I use engine.get_tables() to determine the table names before declaring the Table objects, but I would rather address this from the core issue first, if appropriate.</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/1012/autoload_case_sensitive.py">autoload_case_sensitive.py</a> | <a href="../wiki/imported_issue_attachments/1012/1012_reload.py">1012_reload.py</a></p>
<p dir="auto">Please add support for spatial data types as well as spatial indices for all RDBMS.  Not having those data types limits utility.  Especially for mobile apps.</p>