Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
65aa9420
Kaydet (Commit)
65aa9420
authored
Şub 25, 2016
tarafından
zshimanchik
Kaydeden (comit)
Tim Graham
Şub 26, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24653 -- Fixed MySQL database introspection when using read_default_file.
üst
62ea8644
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
introspection.py
django/db/backends/mysql/introspection.py
+4
-4
No files found.
django/db/backends/mysql/introspection.py
Dosyayı görüntüle @
65aa9420
...
...
@@ -165,10 +165,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
kc.`referenced_table_name`, kc.`referenced_column_name`
FROM information_schema.key_column_usage AS kc
WHERE
kc.table_schema =
%
s
AND
kc.table_schema =
DATABASE()
AND
kc.table_name =
%
s
"""
cursor
.
execute
(
name_query
,
[
self
.
connection
.
settings_dict
[
'NAME'
],
table_name
])
cursor
.
execute
(
name_query
,
[
table_name
])
for
constraint
,
column
,
ref_table
,
ref_column
in
cursor
.
fetchall
():
if
constraint
not
in
constraints
:
constraints
[
constraint
]
=
{
...
...
@@ -185,10 +185,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
SELECT c.constraint_name, c.constraint_type
FROM information_schema.table_constraints AS c
WHERE
c.table_schema =
%
s
AND
c.table_schema =
DATABASE()
AND
c.table_name =
%
s
"""
cursor
.
execute
(
type_query
,
[
self
.
connection
.
settings_dict
[
'NAME'
],
table_name
])
cursor
.
execute
(
type_query
,
[
table_name
])
for
constraint
,
kind
in
cursor
.
fetchall
():
if
kind
.
lower
()
==
"primary key"
:
constraints
[
constraint
][
'primary_key'
]
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment