| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Command exits with non-zero status if changes without migrations exist.
|
|
|
|
|
|
| |
migrations.
Thanks to Markus for the suggestion and Tim for the review.
|
|
|
|
| |
deprecation timeline.
|
|
|
|
|
|
| |
squashmigrations
Thanks Tim Graham for the review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change partly goes back to the old behavior for forwards migrations
which should reduce the amount of memory consumption (#24745). However,
by the way the current state computation is done (there is no
`state_backwards` on a migration class) this change cannot be applied to
backwards migrations. Hence rolling back migrations still requires the
precomputation and storage of the intermediate migration states.
This improvement also implies that Django does not handle mixed
migration plans anymore. Mixed plans consist of a list of migrations
where some are being applied and others are being unapplied.
Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well
as everybody involved on the ticket that kept me looking into the issue.
|
| |
|
|
|
|
| |
disabled migrations
|
|
|
|
| |
app basis
|
|
|
|
| |
model operations.
|
|
|
|
| |
migration files
|
|
|
|
| |
Fixed a regression introduced in e1427cc609fa6ab247501b101cfb3c0092aba55b when running tests in reverse order.
|
|
|
|
|
|
|
| |
equality to prevent infinite migrations
Thanks Sayid Munawar and Tim Graham for the report, investigation and
review.
|
|
|
|
| |
MIGRATION_MODULES setting.
|
| |
|
|
|
|
|
|
| |
merging migrations
Thanks Carl Meyer for the report and Tim Graham for the review.
|
|
|
|
| |
migration has a number-only filename.
|
| |
|
|
|
|
|
|
|
|
| |
in the migrate command.
Ensured squashed migrations are recorded as applied when the
migrate command is run and all of the original migrations
have been previously applied.
|
|
|
|
| |
serialization in migrations
|
|
|
|
| |
builtins on Python 2.
|
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
|
|
|
|
|
|
| |
The new attribute is checked when the `migrate --fake-initial` option
is used. initial will be set to True for all initial migrations (this
is particularly useful when initial migrations are split) as well as
for squashed migrations.
|
|
|
|
| |
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.
|
|
|
|
|
| |
Forwardport of ae1d663b7913f6da233c55409c4973248372d302
from stable/1.8.x plus more.
|
|
|
|
| |
Thanks Andriy Sokolovskiy and Simon Charette for the review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AlterFooTogether
The idea behind this change is, that AlterUniqueTogether,
AlterIndexTogether and AlterOrderWithRespectTo can always be moved after
an Add/Alter/Rename/RemoveField operation if they don't refer to the
respective field and are not empty sets / None.
Combined with the optimizations of duplicate AlterUniqueTogether,
AlterIndexTogether, and AlterOrderWithRespectTo operations from
128caa1e16ec2627737748f75c8e55600a3df97f, these operations are optimized
in a later round of the optimizer.
Thanks Tim Graham for the review.
|
|
|
|
|
|
| |
AlterModelTable/AlterFooTogether/AlterOWRT
Thanks Andrew Godwin for the review.
|
|
|
|
|
|
| |
optimizing migrations
Thanks Andrew Godwin for the review.
|
| |
|
|
|
|
| |
comment to avoid regression.
|
|
|
|
| |
migrations.
|
|
|
|
| |
migration tests.
|
|
|
|
| |
migrations with a dependency.
|
| |
|
|
|
|
|
|
|
| |
tuple and dict values
Nested deconstruction should recursively deconstruct items within list,
tuple and dict values.
|
|
|
|
|
|
|
|
|
| |
module.
Added apps to unmigrated apps if the migrations module is a file
or a folder missing __init__.py.
Thanks to Ernest0x for the bug report.
|
| |
|
|
|
|
| |
schema and migrations tests.
|
|
|
|
| |
Thanks Aymeric Augustin for the review.
|
|
|
|
|
|
|
|
|
|
| |
ManyToMany relations
This is a regression caused by introducing rendered migration states in
1aa3e09c2043 and the _meta refactoring in fb48eb05816b.
Thanks to Danilo Bargen for reporting the issue and Marten Kenbeek and
Tim Graham for triaging the bug and providing the initial test case.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
field alteration
Thanks Simon Percivall for the report, and Simon Charette and Tim
Graham for the reviews.
|
|
|
|
| |
if it's unused.
|
|
|
|
|
|
|
|
|
| |
Currently some of the migrations tests rely on the fact 'input' is aliased
because of six, instead of using mock.patch. Replace this code with proper
use of mock.patch.
Also, replace one case of excessively specific python version check with
testing six.PY3
|
|
|
|
|
|
|
|
|
| |
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.
|