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 16741,"Naming a model field to ""num_connections"" causes syncdb to seemingly ignore it (mysql)",honn@…,nobody,"Not sure this is a bug or a case of an undocumented restriction. Naming a model field (in this case a PositiveIntegerField) ""num_connections"" and doing a syncdb causes the field to be ignored completely. There is no error and the table is create in the database, just without the num_connections field. To check that the model itself is not broken in other ways (and obfuscating the real cause of the problem) I have tried renaming the ""num_connections"" field to other things and it then works. So it appears that it is the name ""num_connections"" is somehow restricted. The database in this case is mysql. Fields with this name can be created by a normal ALTER TABLE so it does not appear to be a problem in mysql but a problem in django. Consequences: Aside from the obvious, that the column is not created in the database, django does not seem to fully understand that it does not exist. Trying to save data into the field does not seem to crash, it is just ignore. I found the error when doing an order_by on the field, which caused an error as the field did not exist. This might be a case of num_connection simply being reserved in either python or django but if this is the case I can't find any documentation on the subject. ",Bug,closed,"Database layer (models, ORM)",1.2,Normal,invalid,"model, field, syncdb, mysql",,Unreviewed,0,0,0,0,0,0