mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #3163 -- Add a "Meta.managed" option to models.
This allows a model to be defined which is not subject to database table creation and removal. Useful for models that sit over existing tables or database views. Thanks to Alexander Myodov, Wolfgang Kriesing and Ryan Kelly for the bulk of this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -71,7 +71,7 @@ class Command(NoArgsCommand):
|
||||
if refto in seen_models:
|
||||
sql.extend(connection.creation.sql_for_pending_references(refto, self.style, pending_references))
|
||||
sql.extend(connection.creation.sql_for_pending_references(model, self.style, pending_references))
|
||||
if verbosity >= 1:
|
||||
if verbosity >= 1 and sql:
|
||||
print "Creating table %s" % model._meta.db_table
|
||||
for statement in sql:
|
||||
cursor.execute(statement)
|
||||
|
||||
Reference in New Issue
Block a user