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
b5a54168
Kaydet (Commit)
b5a54168
authored
Haz 06, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed flake8 errors.
üst
1181b8a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
autodetector.py
django/db/migrations/autodetector.py
+5
-5
optimizer.py
django/db/migrations/optimizer.py
+1
-1
No files found.
django/db/migrations/autodetector.py
Dosyayı görüntüle @
b5a54168
...
...
@@ -157,7 +157,7 @@ class MigrationAutodetector(object):
# Alright, there's a dependency on the same app.
for
j
,
op2
in
enumerate
(
ops
):
if
self
.
check_dependency
(
op2
,
dep
)
and
j
>
i
:
ops
=
ops
[:
i
]
+
ops
[
i
+
1
:
j
+
1
]
+
[
op
]
+
ops
[
j
+
1
:]
ops
=
ops
[:
i
]
+
ops
[
i
+
1
:
j
+
1
]
+
[
op
]
+
ops
[
j
+
1
:]
found
=
True
break
if
found
:
...
...
@@ -384,7 +384,7 @@ class MigrationAutodetector(object):
name
=
name
,
field
=
field
,
),
dependencies
=
[
dependencies
=
[
(
dep_app_label
,
dep_object_name
,
None
,
True
),
]
)
...
...
@@ -396,7 +396,7 @@ class MigrationAutodetector(object):
name
=
model_name
,
unique_together
=
unique_together
,
),
dependencies
=
[
dependencies
=
[
(
app_label
,
model_name
,
name
,
True
)
for
name
,
field
in
sorted
(
related_fields
.
items
())
]
...
...
@@ -408,7 +408,7 @@ class MigrationAutodetector(object):
name
=
model_name
,
index_together
=
index_together
,
),
dependencies
=
[
dependencies
=
[
(
app_label
,
model_name
,
name
,
True
)
for
name
,
field
in
sorted
(
related_fields
.
items
())
]
...
...
@@ -499,7 +499,7 @@ class MigrationAutodetector(object):
operations
.
DeleteModel
(
name
=
model_state
.
name
,
),
dependencies
=
list
(
set
(
dependencies
)),
dependencies
=
list
(
set
(
dependencies
)),
)
def
generate_added_fields
(
self
):
...
...
django/db/migrations/optimizer.py
Dosyayı görüntüle @
b5a54168
...
...
@@ -51,7 +51,7 @@ class MigrationOptimizer(object):
for
i
,
operation
in
enumerate
(
operations
):
# Compare it to each operation after it
for
j
,
other
in
enumerate
(
operations
[
i
+
1
:]):
result
=
self
.
reduce
(
operation
,
other
,
operations
[
i
+
1
:
i
+
j
+
1
])
result
=
self
.
reduce
(
operation
,
other
,
operations
[
i
+
1
:
i
+
j
+
1
])
if
result
is
not
None
:
# Optimize! Add result, then remaining others, then return
new_operations
.
extend
(
result
)
...
...
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