diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py
index e7b4b46..f4b5396 100644
a
|
b
|
class Command(NoArgsCommand):
|
63 | 63 | if router.allow_syncdb(db, m)]) |
64 | 64 | for app in models.get_apps() |
65 | 65 | ) |
| 66 | def model_installed(model): |
| 67 | opts = model._meta |
| 68 | converter = connection.introspection.table_name_converter |
| 69 | return not ((converter(opts.db_table) in tables) or |
| 70 | (opts.auto_created and converter(opts.auto_created._meta.db_table) in tables)) |
| 71 | |
| 72 | manifest = dict( |
| 73 | (app_name, filter(model_installed, model_list)) |
| 74 | for app_name, model_list in manifest.iteritems() |
| 75 | ) |
66 | 76 | |
67 | 77 | # Create the tables for each model |
68 | 78 | for app_name, model_list in manifest.items(): |
… |
… |
class Command(NoArgsCommand):
|
70 | 80 | # Create the model's database table, if it doesn't already exist. |
71 | 81 | if verbosity >= 2: |
72 | 82 | print "Processing %s.%s model" % (app_name, model._meta.object_name) |
73 | | opts = model._meta |
74 | | if (connection.introspection.table_name_converter(opts.db_table) in tables or |
75 | | (opts.auto_created and |
76 | | connection.introspection.table_name_converter(opts.auto_created._meta.db_table) in tables)): |
77 | | continue |
78 | 83 | sql, references = connection.creation.sql_create_model(model, self.style, seen_models) |
79 | 84 | seen_models.add(model) |
80 | 85 | created_models.add(model) |