﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1640	A little bit more for creating indexes automatically	ned@…	Adrian Holovaty	"I submitted ticket #1508 to create indexes when creating databases, but I missed one thing: the indexes on the core tables.  This patch adds that as well.

{{{
--- site-packages/django/core/management.py	(revision 3838)
+++ site-packages/django/core/management.py	(revision 3839)
@@ -371,13 +371,13 @@
     ""Initializes the database with auth and core.""
     try:
         from django.core import db, meta
         auth = meta.get_app('auth')
         core = meta.get_app('core')
         cursor = db.db.cursor()
-        for sql in get_sql_create(core) + get_sql_create(auth) + get_sql_initial_data(core) + get_sql_initial_data(auth):
+        for sql in get_sql_create(core) + get_sql_create(auth) + get_sql_initial_data(core) + get_sql_initial_data(auth) + get_sql_indexes(core) + get_sql_indexes(auth):
             cursor.execute(sql)
         cursor.execute(""INSERT INTO %s (%s, %s) VALUES ('example.com', 'Example site')"" % \
             (db.db.quote_name(core.Site._meta.db_table), db.db.quote_name('domain'),
             db.db.quote_name('name')))
     except Exception, e:
         sys.stderr.write(""Error: The database couldn't be initialized.\n%s\n"" % e)
}}}"	defect	closed	Core (Management commands)		normal	fixed			Unreviewed	0	0	0	0	0	0
