[Answered ]-In Django, how do I set the default so that every model is created with INNODB?

2👍

Put that in settings.py:

DATABASE_ENGINE = 'mysql'
DATABASE_OPTIONS = {"init_command": "SET storage_engine=INNODB"}

UPDATE

For Django >= 1.2 this should be write like this:

DATABASES = {
             'default': {
                         'ENGINE': 'mysql',
                         'OPTIONS': {'init_command': 'SET storage_engine=INNODB'}
                        }
            }

Leave a comment