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
24afb1d7
Kaydet (Commit)
24afb1d7
authored
Haz 15, 2014
tarafından
Andrew Godwin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22660: Doc'd you can't have unmigrated apps depend on migrated
üst
edd9f8a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
fields.txt
docs/ref/models/fields.txt
+12
-0
1.7.txt
docs/releases/1.7.txt
+4
-0
migrations.txt
docs/topics/migrations.txt
+15
-0
No files found.
docs/ref/models/fields.txt
Dosyayı görüntüle @
24afb1d7
...
@@ -1062,6 +1062,12 @@ avoid the overhead of an index if you are creating a foreign key for
...
@@ -1062,6 +1062,12 @@ avoid the overhead of an index if you are creating a foreign key for
consistency rather than joins, or if you will be creating an alternative index
consistency rather than joins, or if you will be creating an alternative index
like a partial or multiple column index.
like a partial or multiple column index.
.. warning::
It is not recommended to have a ``ForeignKey`` from an app without migrations
to an app with migrations. See the :ref:`dependencies documentation
<unmigrated-dependencies>` for more details.
Database Representation
Database Representation
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -1261,6 +1267,12 @@ which the model is related, which works exactly the same as it does for
...
@@ -1261,6 +1267,12 @@ which the model is related, which works exactly the same as it does for
Related objects can be added, removed, or created with the field's
Related objects can be added, removed, or created with the field's
:class:`~django.db.models.fields.related.RelatedManager`.
:class:`~django.db.models.fields.related.RelatedManager`.
.. warning::
It is not recommended to have a ``ManyToManyField`` from an app without migrations
to an app with migrations. See the :ref:`dependencies documentation
<unmigrated-dependencies>` for more details.
Database Representation
Database Representation
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
...
...
docs/releases/1.7.txt
Dosyayı görüntüle @
24afb1d7
...
@@ -68,6 +68,10 @@ but a few of the key features are:
...
@@ -68,6 +68,10 @@ but a few of the key features are:
inside ``TransactionTestCase`` :ref:`unless specifically requested
inside ``TransactionTestCase`` :ref:`unless specifically requested
<test-case-serialized-rollback>`.
<test-case-serialized-rollback>`.
* It is not advised to have apps without migrations depend on (have a
:ref:`ForeignKey <ref-foreignkey>` or :ref:`ManyToManyField <ref-manytomany>` to) apps with migrations. Read the
:ref:`dependencies documentation <unmigrated-dependencies>` for more.
.. _app-loading-refactor-17-release-note:
.. _app-loading-refactor-17-release-note:
App-loading refactor
App-loading refactor
...
...
docs/topics/migrations.txt
Dosyayı görüntüle @
24afb1d7
...
@@ -201,6 +201,21 @@ restrict to a single app. Restricting to a single app (either in
...
@@ -201,6 +201,21 @@ restrict to a single app. Restricting to a single app (either in
a guarantee; any other apps that need to be used to get dependencies correct
a guarantee; any other apps that need to be used to get dependencies correct
will be.
will be.
.. _unmigrated-dependencies:
Be aware, however, that unmigrated apps cannot depend on migrated apps, by the
very nature of not having migrations. This means that it is not generally
possible to have an unmigrated app have a ForeignKey or ManyToManyField to
a migrated app; some cases may work, but it will eventually fail.
This is particularly apparent if you use swappable models (e.g.
``AUTH_USER_MODEL``), as every app that uses swappable models will need
to have migrations if you're unlucky. As time goes on, more and more
third-party apps will get migrations, but in the meantime you can either
give them migrations yourself (using :setting:`MIGRATION_MODULES` to
store those modules outside of the app's own module if you wish), or
keep the app with your user model unmigrated.
.. _migration-files:
.. _migration-files:
Migration files
Migration files
...
...
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