#13318: Django messed up the table names. ---------------------------------------------------+------------------------ Reporter: songzi...@gmail.com | Owner: nobody Status: closed | Milestone: Component: Database layer (models, ORM) | Version: 1.2-beta Resolution: worksforme | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by russellm):
* status: new => closed * needs_better_patch: => 0 * resolution: => worksforme * needs_tests: => 0 * needs_docs: => 0 Comment: Under my testing, if you have the following models: {{{ class Bar(models.Model): class Meta: db_table = 'Bar' class Foo(models.Model): bar = models.ForeignKey(Bar) }}} {{{ CREATE TABLE `Bar` ( `id` integer NOT NULL PRIMARY KEY ) ; CREATE TABLE `myapp_foo` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `bar_id` varchar(10) NOT NULL ) ; ALTER TABLE `myapp_foo` ADD CONSTRAINT `bar_id_refs_id_34b02b8` FOREIGN KEY (`bar_id`) REFERENCES `Bar` (`id`); }}} This has capitals where capitals are needed, and quoting where quoting is needed to preserve those capitals. As far as I can make out this is completely correct. -- Ticket URL: <http://code.djangoproject.com/ticket/13318#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.