Hi, I have the following model:
--
from django.db import models
class Phone(models.Model):
id = models.AutoField(primary_key=True, db_column='id')
type = models.CharField(max_length=1, db_column='Type',
null=False, blank=False)
status = models.CharField(max_length=1, db_column
When Django created the above tables, they were created with the
MyISAM engine. If the intermediate table has to have foreign keys
back to the Phone and Room tables, this would be illegal from MySQL's
perspective, which can apparently only form foreign key constraints
between InnoDB tables. If th
enzuela
>
> On Thu, Aug 5, 2010 at 12:48 PM, bksfu wrote:
> > When Django created the above tables, they were created with the
> > MyISAM engine. If the intermediate table has to have foreign keys
> > back to the Phone and Room tables, this would be illegal from MySQL's
Hi All,
When I run manage.py sqlall test, I get the proper MySQL create
statements for my models, (Phone,Room).
Room has a ManyToManyField(Phone) field, so I also get the proper
intermediate Room_phones table:
BEGIN;
CREATE TABLE `Phone` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY , bl
Hi Xavier,
I had dropped my tables earlier, so this wasn't the problem.
Everything
was being created afresh, although there were existing tables in the
DB
that had nothing to do with my models. All my existing tables had
different names
than the ones in my models.
On Aug 7, 2:55 am, Xavier Ordoq
5 matches
Mail list logo