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
57dbc87a
Kaydet (Commit)
57dbc87a
authored
Haz 04, 2015
tarafından
Carl Meyer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleaned up docstring style, per Tim Graham review.
üst
5c085ea7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
executor.py
django/db/migrations/executor.py
+0
-1
test_executor.py
tests/migrations/test_executor.py
+2
-7
No files found.
django/db/migrations/executor.py
Dosyayı görüntüle @
57dbc87a
...
@@ -187,7 +187,6 @@ class MigrationExecutor(object):
...
@@ -187,7 +187,6 @@ class MigrationExecutor(object):
all its replaced migrations applied. In this case no new migration will
all its replaced migrations applied. In this case no new migration will
be applied, but we still want to correctly maintain the applied state
be applied, but we still want to correctly maintain the applied state
of the squash migration.
of the squash migration.
"""
"""
applied
=
self
.
recorder
.
applied_migrations
()
applied
=
self
.
recorder
.
applied_migrations
()
for
key
,
migration
in
self
.
loader
.
replacements
.
items
():
for
key
,
migration
in
self
.
loader
.
replacements
.
items
():
...
...
tests/migrations/test_executor.py
Dosyayı görüntüle @
57dbc87a
...
@@ -415,9 +415,7 @@ class ExecutorTests(MigrationTestBase):
...
@@ -415,9 +415,7 @@ class ExecutorTests(MigrationTestBase):
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_squashed"
})
@override_settings
(
MIGRATION_MODULES
=
{
"migrations"
:
"migrations.test_migrations_squashed"
})
def
test_apply_all_replaced_marks_replacement_as_applied
(
self
):
def
test_apply_all_replaced_marks_replacement_as_applied
(
self
):
"""
"""
Applying all replaced migrations marks the replacement as applied.
Applying all replaced migrations marks replacement as applied (#24628).
Ticket #24628.
"""
"""
recorder
=
MigrationRecorder
(
connection
)
recorder
=
MigrationRecorder
(
connection
)
# Place the database in a state where the replaced migrations are
# Place the database in a state where the replaced migrations are
...
@@ -441,10 +439,7 @@ class ExecutorTests(MigrationTestBase):
...
@@ -441,10 +439,7 @@ class ExecutorTests(MigrationTestBase):
def
test_migrate_marks_replacement_applied_even_if_it_did_nothing
(
self
):
def
test_migrate_marks_replacement_applied_even_if_it_did_nothing
(
self
):
"""
"""
A new squash migration will be marked as applied even if all its
A new squash migration will be marked as applied even if all its
replaced migrations were previously already applied.
replaced migrations were previously already applied (#24628).
Ticket #24628.
"""
"""
recorder
=
MigrationRecorder
(
connection
)
recorder
=
MigrationRecorder
(
connection
)
# Record all replaced migrations as applied
# Record all replaced migrations as applied
...
...
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