summaryrefslogtreecommitdiff
path: root/django/db/migrations
AgeCommit message (Collapse)Author
2014-05-06Added a bunch of missing unicode_literalsClaude Paroz
Refs #22564.
2014-05-02Fixed #22435 -- Prevented adding a ManyToManyField from prompting for a default.Tim Graham
Thanks andrewsg for the report.
2014-05-02Fix migration autodector to work correctly with custom deconstructed valuesChris Beaven
2014-04-30flake8 fixes.Tim Graham
2014-04-30Fixed #22485: Include all unmigrated apps in project state by default.Andrew Godwin
2014-04-30Fixed #22474 -- Made migration recorder aware of multiple databasesClaude Paroz
Thanks Tim Graham for the review.
2014-04-26Fixed #3214 -- Stopped parsing SQL with regex.Aymeric Augustin
Avoided introducing a new regex-based SQL splitter in the migrations framework, before we're bound by backwards compatibility. Adapted this change to the legacy "initial SQL data" feature, even though it's already deprecated, in order to facilitate the transition to migrations. sqlparse becomes mandatory for RunSQL on some databases (all but PostgreSQL). There's no API to provide a single statement and tell Django not to attempt splitting. Since we have a more robust splitting implementation, that seems like a good tradeoff. It's easier to add a new keyword argument later if necessary than to remove one. Many people contributed to both tickets, thank you all, and especially Claude for the review. Refs #22401.
2014-04-20Fixed flake8 errors.Tim Graham
2014-04-18Fixed #22397 -- Issues removing M2M field with explicit through modelAndrew Gorcester
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.
2014-04-18Revert "Fixed #22397 -- Issues removing M2M field with explicit through model."Simon Charette
This reverts commit 00e3b9a2a992ee0b7288eeeb03e7cbd52ebc6dce. It's causing a regression when tested with the proxy_model_inheritance tests.
2014-04-17Fixed #22397 -- Issues removing M2M field with explicit through model.Andrew Gorcester
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.
2014-04-13Fixed #22350 -- Consistently serialize bytes and text in migrations.Simon Charette
Thanks to @treyhunner and Loïc for their suggestions and review.
2014-04-03Fixed #22363 -- Correctly serialize `django.utils.datetime_safe` objects.Simon Charette
Thanks to linovia for the report.
2014-03-31Fixed #22319 -- Fixed migration external dependencies when there are ↵Loic Bistuer
internal dependencies.
2014-03-25Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.Tim Graham
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.
2014-03-25Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.Loic Bistuer
2014-03-25Fixed #22300 -- Fixed crash in migrations when changing non-relational field ↵Stephen Burrows
to relational.
2014-03-19Mark model renaming as irreversible for now (#22248)Andrew Godwin
2014-03-19Fixed #22275: unique_together broken if ForeignKey split into new file.Andrew Godwin
Thanks to bak1an for the patch.
2014-03-11Fix AlterField migrations that are related to a RenameModel migrationChris Beaven
2014-03-11Fix autodetector creation of RenameModel migration to capitalize model namesChris Beaven
2014-03-10Fixed #22239 -- Add auto detection of renamed modelsChris Beaven
2014-03-08Fix bad conflict detection during makemigrationsAndrew Godwin
2014-03-06Don't allow really long migration namesAndrew Godwin
2014-03-06Fixed #22204: Bad circular-dep-breaking if more than one per runAndrew Godwin
2014-03-04Fixed three small flake8 violations.Alex Gaynor
2014-03-05Fixed #21893 -- ModelState didn't account for MTI parents inherited from ↵Loic Bistuer
abstract models.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-03-01Fixed #22172 -- Allowed index_together to be a single list (rather than list ↵Anubhav Joshi
of lists).. Thanks EmilStenstrom for the suggestion.
2014-02-28Fix keyword agument names in RunPython to be positionalAndrew Godwin
2014-02-23Fixed #22095 -- Enabled backward migrations for RunPython operationsAndrew Gorcester
Added reversible property to RunPython so that migrations will not refuse to reverse migrations including RunPython operations, so long as reverse_code is set in the RunPython constructor. Included tests to check the reversible property on RunPython and the similar RunSQL.
2014-02-17Merge pull request #2270 from bmispelon/ticket-22030Andrew Godwin
Fixed #22030 -- Don't assume that all fields have a swappable_setting at...
2014-02-14Fixed #22035 -- reordered migration operationsAnton Baklanov
Now AddField actions appear in operations list before AlterUniqueTogether actions. Thanks to SmileyChris for the report.
2014-02-13Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.Baptiste Mispelon
2014-02-12Fix my slightly hasty autodetector changesAndrew Godwin
2014-02-12Remove redunant code from RunPython operationAndrew Godwin
2014-02-09Fixed #21868: Don't die when seeing py3 namespace packages for mig dirsAndrew Godwin
2014-02-09Fixed #21958: Handle dependencies for swappable models in AddFieldAndrew Godwin
2014-02-09Fixed #21968: Bad detection of old-style apps to add initial migrationAndrew Godwin
2014-02-09Fixed #21954: Raise nice error when serializing datetimes with timezonesAndrew Godwin
2014-02-09Removed unused imports + other flake8 fixes.Tim Graham
2014-02-09Fixed #21892: RunPython no longer accepts stringsAndrew Godwin
2014-02-08Fixed #21674 -- Deprecated the import_by_path() function in favor of ↵Berker Peksag
import_string(). Thanks Aymeric Augustin for the suggestion and review.
2014-02-05Fix pep8 violation in migration template.Marc Tamlyn
2014-01-27Fixed #21874 -- Require Django applications to have a filesystem path.Carl Meyer
Wherever possible this filesystem path is derived automatically from the app module's ``__path__`` and ``__file__`` attributes (this avoids any backwards-compatibility problems). AppConfig allows specifying an app's filesystem location explicitly, which overrides all autodetection based on ``__path__`` and ``__file__``. This permits Django to support any type of module as an app (namespace packages, fake modules, modules loaded by other hypothetical non-filesystem module loaders), as long as the app is configured with an explicit filesystem path. Thanks Aymeric for review and discussion.
2014-01-27Fixed #21872: Not detecting dependencies from M2M fieldsAndrew Godwin
2014-01-26Took advantage of the new get_model API. Refs #21702.Aymeric Augustin
2014-01-24Fix soft-apply detection of migrations with dependenciesAndrew Godwin
2014-01-22Fixed #21852 -- Make migration writer serialize iteratorsMarkus Holtermann
2014-01-19Fixed #21290: Documented migration serializing and improved errorAndrew Godwin