I've got the following: class Page(models.Model): name = models.CharField(maxlength=64, db_index=True, unique=True) description = models.TextField(blank=True)
class Text(models.Model): page = models.ForeignKey(Page, db_index=True, edit_inline=models.STACKED) content = models.TextField(core=True) When I run "./manage.py syncdb" it creates the tables and everything works ok, but if I look in MySQL at the table description, the index isn't listed: mysql> desc page_text; +--------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | page_id | int(11) | | | 0 | | | content | longtext | | | | | But if I view the "./manage sqlall page" it lists the CREATE INDEX statements... CREATE TABLE `page_text` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `page_id` integer NOT NULL, `content` longtext NOT NULL, ); ALTER TABLE `page_text` ADD CONSTRAINT page_id_refs_id_7038ecc2 FOREIGN KEY (`page_id`) REFERENCES `page_page` (`id`); CREATE INDEX page_text_page_id ON `page_text` (`page_id`); And if I copy and paste those statements it works ok too. But I'd expect this to happen via syncdb. There is a bug so I didn't create a new one but it mentions sqlreset even though this bug exists for syncdb... http://code.djangoproject.com/ticket/1828 Are there different places the calls are made for syncdb vs. sqlall? I can dig into the code to see what the differences might be. Thanks, Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---