| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
migrations.
Thanks to Markus for the suggestion and Tim for the review.
|
| |
|
|
|
|
| |
model operations.
|
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
|
|
|
| |
GenericForeignKey
|
|
|
|
|
|
|
|
|
| |
the model state
If the only manager on the model is the default manager defined
by Django (`objects = models.Manager()`), this manager will not
be added to the model state. If it is custom, it needs to be
passed to the model state.
|
| |
|
|
|
|
| |
schema and migrations tests.
|
|
|
|
| |
Thanks Aymeric Augustin for the review.
|
|
|
|
|
|
|
| |
in migrations
Thanks to Reto Aebersold for reporting the issue and Tim Graham and
Claude Paroz for the review.
|
|
|
|
| |
Thanks tttomekkk for the report.
|
|
|
|
|
| |
Changed ModelState.clone() to create a shallow copy of self.fields
and self.managers.
|
|
|
|
|
| |
Created bulk_update() context manager on StateApps. Sped up unregistering
models in reload_models() by using this context mananger.
|
|
|
|
|
|
|
|
|
| |
during reloads
This also prevents state modifications from corrupting previous states.
Previously, when a model defining a relation was unregistered first,
clearing the cache would cause its related models' _meta to be cleared
and would result in the old models losing track of their relations.
|
|
|
|
|
|
|
|
|
| |
generator choices.
If Field.choices is provided as an iterator, consume it in __init__ instead
of using itertools.tee (which ends up holding everything in memory
anyway). Fixes a bug where deconstruct() was consuming the iterator but
bypassing the call to `tee`.
|
|
|
|
|
|
|
|
|
| |
with unused swappable models
Swapped out models don't have a _default_manager unless they have
explicitly defined managers. ModelState.from_model() now accounts for
this case and uses an empty list for managers if no explicit managers
are defined and a model is swapped out.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
previously added field in migrations
When a related field is deleted, the related model must be updated. As
unchanged models are shared in migration states, the related model must
be re-rendered so that the change applies to a new copy of the related
model.
Thanks Henrik Heimbuerger for the report.
|
| |
|
| |
|
|
|
|
|
|
| |
migrations
Thanks Tim Graham for the review.
|
|
|
|
|
|
|
| |
retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
|
|
|
|
|
| |
migrations
Thanks Tim Graham and Markus Holtermann for the reviews.
|
|
|
|
| |
Refs #23745.
|
|
|
|
|
|
|
| |
managers in migration
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
|
|
|
|
|
|
| |
3282.
Thanks Collin Anderson for the review.
|
|
|
|
|
|
|
|
| |
dotted app names
Made sure the app labels stay unique for the AppConfigStubs, so
migrations wouldn't fail if two dotted app names has the same last part
(e.g. django.contrib.auth and vendor.auth)
|
|
|
|
|
|
| |
ModelState.
Thanks Collin Anderson for the report and original patch.
|
|
|
|
| |
order_with_respect_to
|
|
|
|
|
|
| |
instances.
Thanks to Trac alias tbartelmess for the report and the test project.
|
| |
|
|
|
|
| |
graph load
|
|
|
|
| |
state by default.
|
|
|
|
|
|
| |
migrated.
Thanks to cdestigter for the report.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
through model
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).
Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
|
|
|
|
|
|
|
|
| |
explicit through model."
This reverts commit 00e3b9a2a992ee0b7288eeeb03e7cbd52ebc6dce.
It's causing a regression when tested with the proxy_model_inheritance tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
through model.
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).
Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
|
|
|
|
|
|
|
|
| |
unmanaged models.
This commit reverts 69d4b1c and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
|
|
|
|
| |
unmanaged models.
|
|
|
|
| |
parents inherited from abstract models.
|
|
|
|
|
|
| |
list (rather than list of lists)..
Thanks EmilStenstrom for the suggestion.
|
|
|
|
| |
snuck in
|
| |
|
|
|
|
| |
_ptr fields
|
| |
|
|
|
|
|
|
| |
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
|
|
|
|
| |
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improved Andrew's hack to create temporary app caches to handle
migrations. Now the main app cache has a "master" flag set to True
(which is a non-default keyword argument, thus unlikely to be used by
mistake). Other app cache instances have "master" set to False.
The only sanctioned way to access the app cache is by importing
django.core.apps.app_cache.
If you were instanciating an app cache and relying on the Borg pattern,
you'll have to refactor your code.
|
| |
|