summaryrefslogtreecommitdiff
path: root/django/db/migrations
AgeCommit message (Collapse)Author
2014-01-19Fixed #21664: Multi-table inheritance was duplicating _ptr fieldsAndrew Godwin
2014-01-19Fixed #21786: Bad behaviour when mixins + abstract bases for migrationsAndrew Godwin
2014-01-19Fixed #21783: (again) Found second source of bug, also squashed it.Andrew Godwin
2014-01-19Merge pull request #1681 from loic/migrations.formatAndrew Godwin
Fixed #21323 -- Improved readability of serialized Operation.
2014-01-20Fixed #21323 -- Improved readability of serialized Operation.Loic Bistuer
2014-01-19Fix unicode default input on py3Andrew Godwin
2014-01-19Implement swappable model support for migrationsAndrew Godwin
2014-01-16Fixed #21784: Correctly decode stdin input for migration defaultsAndrew Godwin
2014-01-08Fixed #21142: Dependency failures on unmigrated apps.Andrew Godwin
2013-12-31Made it possible to change an application's label in its configuration.Aymeric Augustin
Fixed #21683.
2013-12-30Removed the only_with_models_module argument of get_model[s].Aymeric Augustin
Now that the refactorings are complete, it isn't particularly useful any more, nor very well named. Let's keep the API as simple as possible. Fixed #21689.
2013-12-30Populated Apps instances immediately by default.Aymeric Augustin
2013-12-29Replaced Options.object_name.lower() by Options.model_name.Aymeric Augustin
Thanks Simon for the suggestion. Also removed inappropriate lowercasing of app labels in migrations. Unlike model names, they are case sensitive.
2013-12-28Changed get_model to raise an exception on errors.Aymeric Augustin
Returning None on errors required unpythonic error checking and was inconsistent with get_app_config. get_model was a private API until the previous commit, but given that it was certainly used in third party software, the change is explained in the release notes. Applied the same change to get_registered_model, which is a new private API introduced during the recent refactoring.
2013-12-28Populated non-master app registries.Aymeric Augustin
This removes the gap between the master app registry and ad-hoc app registries created by the migration framework, specifically in terms of behavior of the get_model[s] methods. This commit contains a stealth feature that I'd rather not describe.
2013-12-28Used app_label instead of appname.Aymeric Augustin
The last component of the dotted path to the application module is consistently referenced as the application "label". For instance it's AppConfig.label. appname could be confused with AppConfig.name, which is the full dotted path.
2013-12-27Created a constant for the migrations module name.Aymeric Augustin
Mostly for consistency with MODELS_MODULE_NAME; it's unlikely to change.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-17Deborgified the app cache.Aymeric Augustin
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.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Made it possible to create apps without a models module.Aymeric Augustin
This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
2013-12-17Deprecated get_app().Aymeric Augustin
2013-12-17Deprecated get_apps().Aymeric Augustin
2013-12-17Deprecated get_app_package, get_app_path and get_app_paths.Aymeric Augustin
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-11Fix altering of SERIAL columns and InnoDB being picky about FK changesAndrew Godwin
2013-12-11Better default name for migrations we can't give nice names toAndrew Godwin
2013-12-11Change FKs when what they point to changesAndrew Godwin
2013-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-12-06Made the migration detector use meta.local_fields instead of meta.fields.Baptiste Mispelon
Refs #21010. Thanks to Loïc for the patch.
2013-12-06Fixed ModelState breaking when unique_together has unhashable elements.Baptiste Mispelon
2013-12-06Added app_label to the error message when field reconstructing fails.Baptiste Mispelon
2013-12-06Merge pull request #2037 from bmispelon/invalidbaseserrorAndrew Godwin
Fixed TypeError when rendering ModelState with multiple bases.
2013-12-06Removed unreachable `else` in `try` block.maurycyp
2013-12-06Fixed TypeError when rendering ModelState with multiple bases.Baptiste Mispelon
2013-12-05Better error reporting when from_app_cache failsAndrew Godwin
2013-12-04Migration VCS conflict detection and --merge for makemigrationsAndrew Godwin
2013-12-04Don't make a second migration if there was a force-null-default addcol.Andrew Godwin
2013-11-28Fixed a deprecation warning introduced by 96dd48c83f.Simon Charette
2013-11-27Include deferred SQL in sqlmigrate outputAndrew Godwin
2013-11-27Fixed #21438: makemigrations now detects ManyToManyFieldsAndrew Godwin
2013-11-27Change initial migration writing to work as docs suggest.Andrew Godwin
Application template now includes an empty migrations module, and the autodetector will only make initial migrations for apps with empty modules.
2013-11-27Fix squashed migration loading ordering issueAndrew Godwin
2013-11-06flake8 fixesAlex Gaynor
2013-11-06Massive migration optimiser improvements + RenameModel opnAndrew Godwin
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-03Fixed flake8 E251 violationsMilton Mazzarri
2013-11-02More attacking E302 violatorsAlex Gaynor