diff options
author | Anv3sh <anveshgreat11@gmail.com> | 2022-05-12 01:00:13 +0530 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-06-01 08:40:44 +0200 |
commit | 295249c901e13ec1703ada5c414cd97aba72f3e9 (patch) | |
tree | a2997378671133fdb93ca12aa7f855e42f23f71d /django/db/backends/mysql/features.py | |
parent | ebf25555bbed3e9112d4b726575d60b242daf48a (diff) | |
download | django-295249c901e13ec1703ada5c414cd97aba72f3e9.tar.gz |
Fixed #32234 -- Made inspectdb inform about composite primary keys.
Diffstat (limited to 'django/db/backends/mysql/features.py')
-rw-r--r-- | django/db/backends/mysql/features.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/mysql/features.py b/django/db/backends/mysql/features.py index 5387dffb9c..3ea3deeae3 100644 --- a/django/db/backends/mysql/features.py +++ b/django/db/backends/mysql/features.py @@ -39,6 +39,13 @@ class DatabaseFeatures(BaseDatabaseFeatures): SET V_I = P_I; END; """ + create_test_table_with_composite_primary_key = """ + CREATE TABLE test_table_composite_pk ( + column_1 INTEGER NOT NULL, + column_2 INTEGER NOT NULL, + PRIMARY KEY(column_1, column_2) + ) + """ # Neither MySQL nor MariaDB support partial indexes. supports_partial_indexes = False # COLLATE must be wrapped in parentheses because MySQL treats COLLATE as an |