summaryrefslogtreecommitdiff
path: root/django/core/management/commands/migrate.py
AgeCommit message (Collapse)Author
2026-03-08Fixed #12529 -- Fixed migrate --run-syncdb crash for existing model with ↵Mariusz Felisiak
truncated db_table names.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2024-12-11Fixed #35920 -- Observed requires_system_checks in migrate and runserver.Jacob Walls
Before, the full suite of system checks was run by these commands regardless if requires_system_checks had been overridden. Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-10-15Fixed #35656 -- Added an autodetector attribute to the makemigrations and ↵leondaz
migrate commands.
2024-05-10Fixed #35429 -- Added argparse choices to --database options.SaJH
2024-02-13Fixed #35122 -- Made migrate --prune option respect --app_label.Moein Bbp
2022-09-27Fixed #34052 -- Made migrate --check don't emit signals and output when up ↵JunKi Yoon
to date.
2022-09-26Improved migrate help text for the --check option.Mike Lissner
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-21Fixed #26760 -- Added --prune option to migrate command.Jacob Walls
2021-08-04Fixed #29063 -- Fixed migrate crash when specifying a name of partially ↵Jacob Walls
applied squashed migrations.
2021-02-04Fixed #32395 -- Allowed capturing stdout of migration signals.Simon Charette
2020-06-12Fixed #31645 -- Enhanced the migration warning for migrate commmand.Chinmoy Chakraborty
Added the list of apps with changes not reflected in migrations.
2020-05-21Fixed #31546 -- Allowed specifying list of tags in ↵Hasan Ramezani
Command.requires_system_checks.
2020-05-04Changed `'%s' % value` pattern to `str(value)`.Nick Pope
2020-04-27Refs #18325 -- Removed unnecessary line endings in management commands.François Freitag
The OutputWrapper automatically adds \n when it’s not present.
2020-04-27Removed unnecessary tuple wrapping of single format string argument.François Freitag
2020-03-26Fixed #31402 -- Added migrate --check option.Gordon Pendleton
Command exits with non-zero status if unapplied migrations exist.
2020-02-07Refs #31055 -- Added --database option to the check management command.Simon Charette
This avoids enabling the ``database`` checks unless they are explicitly requested and allows to disable on a per-alias basis which is required when only creating a subset of the test databases. This also removes unnecessary BaseCommand._run_checks() hook.
2019-10-14Fixed #30870 -- Fixed showing that RunPython operations are irreversible by ↵Mariusz Felisiak
migrate --plan. Thanks Hasan Ramezani for the initial patch and Kyle Dickerson for the report.
2019-05-08Used time.monotonic() instead of time.time() where applicable.Przemysław Suliga
time.monotonic() available from Python 3.3: - Nicely communicates a narrow intent of "get a local system monotonic clock time" instead of possible "get a not necessarily accurate Unix time stamp because it needs to be communicated to outside of this process/machine" when time.time() is used. - Its result isn't affected by the system clock updates. There are two classes of time.time() uses changed to time.monotonic() by this change: - measuring time taken to run some code. - setting and checking a "close_at" threshold for for persistent db connections (django/db/backends/base/base.py).
2019-02-13Fixed #30184 -- Removed ellipsis characters from shell output strings.Dan Davis
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654) to avoid a crash when the user shell doesn't support non-ASCII characters.
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2018-11-21Fixed #29949 -- Refactored db introspection identifier converters.Mariusz Felisiak
Removed DatabaseIntrospection.table_name_converter()/column_name_converter() and use instead DatabaseIntrospection.identifier_converter(). Removed DatabaseFeatures.uppercases_column_names. Thanks Tim Graham for the initial patch and review and Simon Charette for the review.
2018-11-14Fixed #25884 -- Fixed migrate --run-syncdb when specifying an app label.Sarah Guermond
2018-09-19Refs #29198 -- Fixed migrate --plan crash if RunSQL uses a list or tuple.Tim Graham
Also fixed test failures if sqlparse isn't installed.
2018-08-22Refs #29654 -- Replaced three dots with ellipsis character in output strings.Claude Paroz
2018-08-03Fixed #29198 -- Added migrate --plan option.Calvin DeBoer
2018-07-02Removed parser.add_arguments() arguments that match the defaults.Claude Paroz
2018-06-20Fixed #29506 -- Added validation for migrate's app_label option.Claude Paroz
Thanks MyungSeKyo for the report and the initial patch.
2018-05-13Fixed #17379 -- Removed management commands deactivation of the locale.Claude Paroz
2017-12-28Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-04-01Removed implicit default store_true/false argparse args.Jon Dufresne
argparse automatically sets the default value for store_true/false arguments to its opposite.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Fixed #27666 -- Delayed rendering of recursivly related models in migration ↵Markus Holtermann
operations.
2016-12-28Fixed #27631 -- Prevented execution of transactional DDL statements when ↵Simon Charette
unsupported. Executing a DDL statement during a transaction on backends that don't support it silently commits, leaving atomic() in an incoherent state. While schema_editor.execute() could technically be used to execute DML statements such usage should be uncommon as these are usually performed through the ORM. In other cases schema_editor.connection.execute() can be used to circumvent this check. Thanks Adam and Tim for the review.
2016-11-29Fixed #27507 -- Used SchemaEditor.execute() to run deferred_sql in migrate's ↵Lex Berezhny
sync_apps().
2016-08-24Fixed #27100 -- Included already applied migration changes in the ↵Simon Charette
pre-migrate state. Refs #24100. Thanks Tim for the review.
2016-08-24Fixed #27044 -- Included already applied migration changes in the ↵Simon Charette
post-migrate state when the execution plan is empty. Refs #24100. Thanks tkhyn for the report and Tim for the review.
2016-06-16Fixed flake8 2.6 warnings.Tim Graham
2016-05-15Fixed #24100 -- Made the migration signals dispatch its plan and apps.Simon Charette
Thanks Markus for your contribution and Tim for your review.
2016-04-12Fixed #26492 -- Fixed "maximum recursion depth exceeded" migrate error.Berker Peksag
A regression introduced in 0d3c616fbb2f49fa7ff6809e5a6777275352b35b; refs #26351.
2016-04-08Refs #26351 -- Added check hook to support database-related checksClaude Paroz
Thanks Tim Graham and Shai Berger for the reviews.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-05Fixed #25850 -- Made migrate/makemigrations error on inconsistent history.Attila Tovt
2016-03-05Refs #26315 -- Cleaned up argparse options in commands.Jon Dufresne
* Removed type coercion. Options created by argparse are already coerced to the correct type. * Removed fallback default values. Options created by argparse already have a default value. * Used direct indexing. Options created by argparse are always set. This eliminates the need to use dict.get().
2016-01-29Fixed #26150 -- Sorted app_labels in migrate command outputMarkus Holtermann