Opened 10 years ago
Closed 10 years ago
#23542 closed Uncategorized (invalid)
Add ability to disable migrations
Reported by: | Yurii Zolot'ko | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django 1.7 introduces migrations which are described at:
https://docs.djangoproject.com/en/1.7/topics/migrations/
Unfortunately this step is now mandatory which restricts Django 1.7 usage. (Otherwise the one get
"CommandError: App 'sessions' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations." on manage.py test immediately).
There are great number of projects that are established enough to have DB schema unmodified for long time already but would benefit from Django 1.7 securiry/bug fixes. Some projects have third-party migration solutions (South is not the only one in the world), some of them could be even non-Python. These projects can not upgrade Django from now either or forced to make dummy migrations.
It would be great if Django had settings to disable new Django's built-in migrations completely. Like
ENABLE_MIGRATIONS = default True and False would fallback syncdb to old create-table-if-not-exists behaviour and manage.py test could be still used for testing applications with no Django migrations created.
Change History (2)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The problem turned out to be in another third-party application having 'migrate' management command too.
I think we'd like to know a bit more about the error you mention, as migrations are not (yet?) mandatory in Django 1.7. Could you paste the full traceback of
manage.py test --traceback
?