>
> I'd be willing to keep the current contract of "things without a
> migrations directory don't get migrated", but I suspect you're doing things
> on apps that already have migrations (which makes my reticence to add a
> setting even bigger - if you "syncdb" an app with migrations to a main
> database, you have forever ruined the migration tracking on it). Would that
> work? Or do you want to do this on apps which are already several
> migrations along? (If that's the case, I suspect we might have to look at
> re-introducing --update, which is going to be near-impossible to do before
> release with the new creation system).
>
You're right, I'm creating an app with migrations but want to be able to
run tests without migrations when I'm mid-development. I also agree that if
I'm running integration tests before deployment, or a non-developer is
running tests before installing something written by someone else then
those tests should use migrations, so it's not as simple as "don't use
migrations in tests".
How about specifying whether a database is migrated as part of the database
definition in the settings module? That way a database would either be
migrated or not, and if a developer wants to set up an alternative
non-migrated database for development there's a supported way of doing it.
Something like:
# in settings_bernie_dev.py
from .settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'testdb.sqlite3'),
'USE_MIGRATIONS': False,
}
}
Bernie :o)
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/b925e40d-ccb5-4db7-9827-7a332fae9405%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.