Kaydet (Commit) 9fec605d authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #1766 -- Fixed bug in syncdb where it allowed two models to have the same…

Fixed #1766 -- Fixed bug in syncdb where it allowed two models to have the same database table. Thanks, Ian Clelland

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst be552664
...@@ -47,6 +47,7 @@ answer newbie questions, and generally made Django that much better: ...@@ -47,6 +47,7 @@ answer newbie questions, and generally made Django that much better:
C8E C8E
Amit Chakradeo <http://amit.chakradeo.net/> Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW ChaosKCW
Ian Clelland <clelland@gmail.com>
Matt Croydon <http://www.postneo.com/> Matt Croydon <http://www.postneo.com/>
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/> Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
Jason Davies (Esaj) <http://www.jasondavies.com/> Jason Davies (Esaj) <http://www.jasondavies.com/>
......
...@@ -454,6 +454,7 @@ def syncdb(): ...@@ -454,6 +454,7 @@ def syncdb():
print "Creating table %s" % model._meta.db_table print "Creating table %s" % model._meta.db_table
for statement in sql: for statement in sql:
cursor.execute(statement) cursor.execute(statement)
table_list.append(model._meta.db_table)
for model in model_list: for model in model_list:
if model in created_models: if model in created_models:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment