summaryrefslogtreecommitdiff
path: root/tests/migrations
AgeCommit message (Collapse)Author
2022-04-04Fixed #33605 -- Fixed migration crash when altering RegexValidator to ↵Brian Helba
pre-compiled regular expression.
2022-03-29Refs #32365 -- Deprecated django.utils.timezone.utc.Carlton Gibson
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-03-23Refs #32365 -- Made migration writer use datetime.timezone.utc.Carlton Gibson
2022-03-11Fixed #33572 -- Implemented CreateModel/AlterModelManagers reduction.Adam Johnson
2022-02-23Refs #33476 -- Added warning to optimizemigration/squashmigrations commands ↵Mariusz Felisiak
when black cannot be applied.
2022-02-22Fixed #27844 -- Added optimizemigration management command.David Wobrock
2022-02-16Fixed #33515 -- Prevented recreation of migration for ManyToManyField to ↵Mariusz Felisiak
lowercased swappable setting. Thanks Chris Lee for the report. Regression in 43289707809c814a70f0db38ca4f82f35f43dbfd. Refs #23916.
2022-02-11Refs #33476 -- Made management commands use black.Carlton Gibson
Run black on generated files, if it is available on PATH.
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-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2022-02-01Fixed #33480 -- Fixed makemigrations crash when renaming field of renamed model.Kirill Safronov
Regression in aa4acc164d1247c0de515c959f7b09648b57dc42.
2022-01-27Fixed #33462 -- Fixed migration crash when altering type of primary key with ↵Mariusz Felisiak
MTI and foreign key. This prevents duplicated operations when altering type of primary key with MTI and foreign key. Previously, a foreign key to the base model was added twice, once directly and once by the inheritance model. Thanks bcail for the report. Regression in 325d7710ce9f6155bb55610ad6b4580d31263557.
2022-01-21Fixed #26760 -- Added --prune option to migrate command.Jacob Walls
2022-01-21Fixed #33449 -- Fixed makemigrations crash on models without ↵Fabian Büchler
Meta.order_with_respect_to but with _order field. Regression in aa4acc164d1247c0de515c959f7b09648b57dc42.
2022-01-10Fixed #29026 -- Added --scriptable option to makemigrations.Jacob Walls
2022-01-07Fixed #33216 -- Simpilified deconstructed paths for some expressions.Allen Jonathan David
2022-01-04Fixed #33402 -- Optimized multiple AlterFooTogether operations.David Wobrock
2022-01-03Refs #29026 -- Allowed customizing InteractiveMigrationQuestioner's prompt ↵Jacob Walls
destination. Previously, the questioner did not obey the value of stdout provided to the command.
2021-12-30Fixed #23273 -- Avoided creation of django_migrations table when there are ↵Jacob Walls
no migrations to apply.
2021-12-27Refs #22983 -- Added tests for squashing migrations with functions from ↵Mariusz Felisiak
migration files. Follow up to ebb13bbd884d8c3053d1d342ef0423240feb05e6.
2021-12-20Removed a Python error message dependency in ↵Jacob Walls
test_questioner_no_default_bad_user_entry_code().
2021-12-20Increased test coverage of django.db.migrations.questioner.Jacob Walls
2021-12-17Fixed #33366 -- Fixed case handling with swappable setting detection in ↵Simon Charette
migrations autodetector. The migration framework uniquely identifies models by case insensitive labels composed of their app label and model names and so does the app registry in most of its methods (e.g. AppConfig.get_model) but it wasn't the case for get_swappable_settings_name() until this change. This likely slipped under the radar for so long and only regressed in b9df2b74b98b4d63933e8061d3cfc1f6f39eb747 because prior to the changes related to the usage of model states instead of rendered models in the auto-detector the exact value settings value was never going through a case folding hoop. Thanks Andrew Chen Wang for the report and Keryn Knight for the investigation.
2021-11-22Fixed #33305 -- Fixed autodetector crash for ForeignKey with hardcoded "to" ↵Baptiste Mispelon
attribute. Co-authored-by: Simon Charette <charette.s@gmail.com>
2021-11-02Fixed #33234 -- Fixed autodetector crash for proxy models inheriting from ↵Mariusz Felisiak
non-model class. Regression in aa4acc164d1247c0de515c959f7b09648b57dc42. Thanks Kevin Marsh for the report.
2021-11-02Fixed #33246 -- Made squashmigrations raise CommandError when squashed_name ↵andrewdotn
already exists.
2021-10-27Fixed #33201 -- Made RenameModel operation a noop for models with db_table.Iuri de Silvio
2021-10-26Corrected AutodetectorTests.test_rename_field_and_foo_together()'s docstring.Mariusz Felisiak
2021-10-25Fixed #31503 -- Made autodetector remove unique/index_together before ↵David Wobrock
altering fields.
2021-10-19Fixed #33197 -- Made field rename with prior matching db_column change a noop.Simon Charette
Thanks Jacob Walls for the report.
2021-10-18Fixed #33194 -- Fixed migrations when altering a field with functional ↵Hannes Ljungberg
indexes/unique constraints on SQLite. This adjusts Expressions.rename_table_references() to only update alias when needed. Regression in 83fcfc9ec8610540948815e127101f1206562ead. Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2021-10-15Fixed #23953 -- Made makemigrations continue number sequence for squashed ↵Jacob Walls
migrations.
2021-10-15Refs #23953 -- Added MigrationAutodetector.parse_number() tests.Jacob Walls
2021-10-12Fixed #29470 -- Logged makemigrations automatic decisions in non-interactive ↵Jacob Walls
mode.
2021-10-12Refs #29470 -- Added makemigrations test for adding fields with no default ↵Jacob Walls
and auto_now_add=True in non-interactive mode.
2021-10-08Fixed #33022 -- Fixed isolation of ↵Mariusz Felisiak
migrations.test_executor.ExecutorTests.test_custom_user().
2021-10-06Fixed #23408 -- Added migrations questioner prompt for adding unique fields ↵Jacob Walls
with a callable default.
2021-09-20Refs #33119 -- Added tests for changing model name case referenced by ↵AliGhotbizadeh
ManyToManyField. Fixed in aa4acc164d1247c0de515c959f7b09648b57dc42.
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-08-31Fixed #33057 -- Fixed recreation of foreign key constraints in m2m tables ↵Mariusz Felisiak
when altering type of referenced primary key on Oracle.
2021-08-30Fixed #24900 -- Allowed migrating backward to squashed migrations.Jacob Walls
2021-08-30Refs #24900 -- Added MigrationLoader test for applying squashed migrations.Jacob Walls
2021-08-27Fixed #32900 -- Improved migrations questioner prompts.Mateo Radman
2021-08-27Refs #32900 -- Added makemigrations tests for messages in interactive mode.Mateo Radman
2021-08-27Refs #32900 -- Added test for ignoring the default value in ↵Mateo Radman
InteractiveMigrationQuestioner.ask_not_null_alteration().
2021-08-26Refs #29898 -- Changed fields in ProjectState's relation registry to dict.Mariusz Felisiak
2021-08-25Refs #29898 -- Made ProjectState encapsulate alterations in relations registry.Manav Agarwal
Thanks Simon Charette and Chris Jerdonek for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-08-19Fixed #33014 -- Made ProjectState raise exception when real_apps argument is ↵Chris Jerdonek
not a set.