mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] Fixed #23538 -- Added SchemaEditor for MySQL GIS.
Thanks Claude Paroz for suggestions and review.
Backport of 74e7f91e6d from master
This commit is contained in:
@@ -124,6 +124,16 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
indexes[row[4]]['unique'] = True
|
||||
return indexes
|
||||
|
||||
def get_storage_engine(self, cursor, table_name):
|
||||
"""
|
||||
Retrieves the storage engine for a given table.
|
||||
"""
|
||||
cursor.execute(
|
||||
"SELECT engine "
|
||||
"FROM information_schema.tables "
|
||||
"WHERE table_name = %s", [table_name])
|
||||
return cursor.fetchone()[0]
|
||||
|
||||
def get_constraints(self, cursor, table_name):
|
||||
"""
|
||||
Retrieves any constraints or keys (unique, pk, fk, check, index) across one or more columns.
|
||||
|
||||
Reference in New Issue
Block a user