Andrew Godwin
51673c146e
Don't treat .pyc/pyo files as migrations. Refs #23237 among others.
2014-08-08 09:57:31 +10:00
Andrew Godwin
6f386b0acb
Restore support for reading __latest__ for compatability
2014-07-25 09:43:54 -07:00
Jeroen Dekkers
3582698c13
Fixed #23071 -- Use last migration's name in dependency to other app
...
Changed the autodetector to lookup the name of the other app's last
migration in the graph and use that as dependency instead of using
__latest__.
2014-07-22 01:03:02 +02:00
Andrew Godwin
2cee1d4642
Fixed #22861 : Internal migrations done first so __first__ works
...
Thanks to Chris Beaven.
2014-06-17 23:28:35 -07:00
Andrew Godwin
09b63a7cce
Fix __latest__ to actually resolve to the latest migration
2014-06-17 22:12:31 -07:00
Andrew Godwin
2b79be2bee
Fixed #22848 : Ignore no-migrations errors during makemigrations only
2014-06-16 09:58:35 -07:00
Andrew Godwin
edd9f8a7b2
Fixed #22563 : Added migration to admin, fixed a few more loader issues.
2014-06-15 11:25:39 -07:00
Andrew Godwin
1e5c01c26e
Improve error message for missing migrations in an app
2014-06-15 11:05:40 -07:00
Chris Beaven
45fa520187
Implement Migration.run_before
...
This attribute (used for reverse dependencies) was previously declared
and mentioned in the code, but never actually used.
2014-05-29 22:42:11 +12:00
Andrew Godwin
12c72796c3
Revert "Fixed #22645 : Allow apps with no models module to still have migrations"
...
This reverts commit a4737bf6ae
.
2014-05-20 16:53:21 +01:00
Andrew Godwin
a4737bf6ae
Fixed #22645 : Allow apps with no models module to still have migrations
2014-05-20 13:19:17 +01:00
Andrew Godwin
5400b29ebf
Fixed #22325 : Ignore __first__ dependencies to your own app
2014-05-08 21:38:56 -07:00
Andrew Godwin
f9d7e18dc5
Fixed #22576 : Ensure makemigrations doesn't touch the database.
2014-05-06 22:41:59 -07:00
Claude Paroz
12474dacef
Added a bunch of missing unicode_literals
...
Refs #22564 .
2014-05-06 09:13:07 +02:00
Tim Graham
45c2d1f5d9
flake8 fixes.
2014-04-30 18:33:46 -04:00
Andrew Godwin
8f6dff372b
Fixed #22485 : Include all unmigrated apps in project state by default.
2014-04-30 12:25:12 -07:00
Andrew Godwin
28779abb75
Fix bad conflict detection during makemigrations
2014-03-08 13:53:20 -08:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Andrew Godwin
2085f53f56
Fixed #21968 : Bad detection of old-style apps to add initial migration
2014-02-09 11:42:10 +00:00
Andrew Godwin
c9de1b4a55
Implement swappable model support for migrations
2014-01-19 16:43:12 +00:00
Andrew Godwin
64887c644a
Fixed #21142 : Dependency failures on unmigrated apps.
2014-01-08 13:00:12 +00:00
Aymeric Augustin
bfcc686d22
Removed the only_with_models_module argument of get_model[s].
...
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-30 23:59:34 +01:00
Aymeric Augustin
2504a50cc2
Created a constant for the migrations module name.
...
Mostly for consistency with MODELS_MODULE_NAME; it's unlikely to change.
2013-12-27 15:36:19 +01:00
Aymeric Augustin
1716b7ce5a
Renamed AppCache to Apps.
...
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin
2fef9e5375
Moved apps back in the toplevel django namespace.
...
Reverted 4a56a93cc4
.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
4a56a93cc4
Moved the new app cache inside core.
2013-12-17 10:17:46 +01:00
Aymeric Augustin
5ba743e262
Made it possible to create apps without a models module.
...
This commit reverts f44c4a5d0f
and 39bbd165
.
django.test.simple will be updated in a separate commit as it requires
invasive changes.
2013-12-17 10:17:45 +01:00
Aymeric Augustin
2732edc5f2
Deprecated get_apps().
2013-12-17 10:17:45 +01:00
Aymeric Augustin
259cd3cd41
Deprecated get_app_package, get_app_path and get_app_paths.
2013-12-17 10:17:45 +01:00
Aymeric Augustin
8662654d6d
Removed module-level functions for the app cache.
...
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-17 10:17:44 +01:00
Aymeric Augustin
860c2c8bc5
Moved django.db.models.loading to django.apps.cache.
...
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Andrew Godwin
3b8e46cbc7
Migration VCS conflict detection and --merge for makemigrations
2013-12-04 16:01:49 +00:00
Andrew Godwin
db4527e3c0
Fix squashed migration loading ordering issue
2013-11-27 12:29:22 +00:00
Andrew Godwin
5ab8b5d72c
Fix migration planner to fully understand squashed migrations. And test.
2013-10-23 22:56:54 +01:00
Loic Bistuer
584110417f
Fixed #21283 -- Added support for migrations if models is a package.
...
Thanks Markus Holtermann for the report.
2013-10-19 09:48:57 -04:00
Andrew Godwin
763ac8b642
First pass on squashmigrations command; files are right, execution not.
2013-10-16 12:00:07 +01:00
Florian Apolloner
ed8919cbcb
Handle Apps with South migrations as unmigrated apps.
2013-10-15 11:57:30 +02:00
Andrew Godwin
32838a5beb
Make db.migrations ignore South-style migrations.
2013-09-06 10:35:53 -05:00
Loic Bistuer
e1266e50b2
Fixed #21015 -- Fixed MigrationLoader when importlib.import_module returns a file module or an empty directory.
2013-09-06 08:30:19 -04:00
Loic Bistuer
82bbb9fe81
Fixed #21014 -- Fixed gobbled ImportError in MigrationLoader.
2013-09-06 08:30:18 -04:00
Andrew Godwin
9f73629420
utils.importlib is deprecated
2013-08-09 17:36:16 +01:00
Andrew Godwin
162f7b938f
Make migrate command recognise prefixes and 'zero'.
2013-07-22 19:43:58 +01:00
Andrew Godwin
41214eaf18
Autodetect fields, have migrate actually work
2013-06-19 16:41:04 +01:00
Andrew Godwin
f25a385a5e
Makemigration command now works
2013-06-19 16:23:52 +01:00
Andrew Godwin
2ae8a8a77d
Fix test running with new apps stuff/migrate actually running migrations
2013-06-19 15:36:02 +01:00
Andrew Godwin
315ab41e41
Initial stab at a migrate command, it's probably quite a way off.
2013-06-07 18:47:17 +01:00
Andrew Godwin
d0ecefc2c9
Start adding operations that work and tests for them
2013-05-29 17:47:10 +01:00
Andrew Godwin
9ce8354672
First phase of loading migrations from disk
2013-05-10 16:00:55 +01:00