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
c1ed21fa
Kaydet (Commit)
c1ed21fa
authored
Tem 26, 2013
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use new transaction API in syncdb section of migrate
üst
6b39010d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
migrate.py
django/core/management/commands/migrate.py
+6
-2
No files found.
django/core/management/commands/migrate.py
Dosyayı görüntüle @
c1ed21fa
...
@@ -12,7 +12,7 @@ from django.db.migrations.executor import MigrationExecutor
...
@@ -12,7 +12,7 @@ from django.db.migrations.executor import MigrationExecutor
from
django.db.migrations.loader
import
AmbiguityError
from
django.db.migrations.loader
import
AmbiguityError
from
django.utils.datastructures
import
SortedDict
from
django.utils.datastructures
import
SortedDict
from
django.utils.importlib
import
import_module
from
django.utils.importlib
import
import_module
from
django.utils.module_loading
import
module_has_submodule
,
import_by_path
from
django.utils.module_loading
import
module_has_submodule
class
Command
(
BaseCommand
):
class
Command
(
BaseCommand
):
...
@@ -162,7 +162,7 @@ class Command(BaseCommand):
...
@@ -162,7 +162,7 @@ class Command(BaseCommand):
# Create the tables for each model
# Create the tables for each model
if
self
.
verbosity
>=
1
:
if
self
.
verbosity
>=
1
:
self
.
stdout
.
write
(
" Creating tables...
\n
"
)
self
.
stdout
.
write
(
" Creating tables...
\n
"
)
with
transaction
.
commit_on_success_unless_managed
(
using
=
connection
.
alias
):
with
transaction
.
atomic
(
using
=
connection
.
alias
,
savepoint
=
False
):
for
app_name
,
model_list
in
manifest
.
items
():
for
app_name
,
model_list
in
manifest
.
items
():
for
model
in
model_list
:
for
model
in
model_list
:
# Create the model's database table, if it doesn't already exist.
# Create the model's database table, if it doesn't already exist.
...
@@ -181,6 +181,10 @@ class Command(BaseCommand):
...
@@ -181,6 +181,10 @@ class Command(BaseCommand):
for
statement
in
sql
:
for
statement
in
sql
:
cursor
.
execute
(
statement
)
cursor
.
execute
(
statement
)
tables
.
append
(
connection
.
introspection
.
table_name_converter
(
model
.
_meta
.
db_table
))
tables
.
append
(
connection
.
introspection
.
table_name_converter
(
model
.
_meta
.
db_table
))
# We force a commit here, as that was the previous behaviour.
# If you can prove we don't need this, remove it.
transaction
.
set_dirty
(
using
=
connection
.
alias
)
# Send the post_syncdb signal, so individual apps can do whatever they need
# Send the post_syncdb signal, so individual apps can do whatever they need
# to do at this point.
# to do at this point.
...
...
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