Using the following settings:
DATABASE_NAME = 'foo-bar'
DATABASE_ENGINE = 'mysql'
The reset_db command will fail (ProgrammingError exception) because the
database name is not escaped in the DROP TABLE command.
From what I understand, the fix involves changing only tyo lines.
In management/reset_db.py, line 68:
drop_query = 'DROP DATABASE IF EXISTS `%s`' % settings.DATABASE_NAME
and line 70:
create_query = 'CREATE DATABASE `%s` %s' % (settings.DATABASE_NAME,
utf8_support)
I'm not sure if that kind of escaping is enough but it fixed the problem
for me.
Original issue reported on code.google.com by bmispe...@gmail.com on 29 Jul 2009 at 3:03
Original issue reported on code.google.com by
bmispe...@gmail.com
on 29 Jul 2009 at 3:03