diff --git a/AUTHORS b/AUTHORS
index cd02cd261a..b0097f8852 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -101,6 +101,7 @@ answer newbie questions, and generally made Django that much better:
Aaron Swartz
Tom Tobin
Joe Topjian
+ Malcolm Tredinnick
Amit Upadhyay
Milton Waddams
Rachel Willmer
diff --git a/django/core/management.py b/django/core/management.py
index ed6993b7a0..db4eace2d9 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -418,17 +418,17 @@ def syncdb():
created_models.add(model)
pending_references.update(references)
sql.extend(_get_sql_for_pending_references(model, pending_references))
- sql = "\n".join(sql)
print "Creating table %s" % model._meta.db_table
- cursor.execute(sql)
+ for statement in sql:
+ cursor.execute(statement)
for model in model_list:
if model in created_models:
sql = _get_many_to_many_sql_for_model(model)
if sql:
- sql = '\n'.join(sql).strip()
print "Creating many-to-many tables for %s model" % model.__name__
- cursor.execute(sql)
+ for statement in sql:
+ cursor.execute(statement)
transaction.commit_unless_managed()
syncdb.args = ''