Modify

Ticket #324 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

M2M join table not created with Django 1.2 alpha 1

Reported by: graham@… Owned by: andrew
Priority: major Milestone: 0.7
Component: databaseapi Version: 0.6.2
Keywords: Cc:

Description

After adding a "Team" table with a M2M relation to an existing model "Competitor" in the same 'fantasy' app, I created a migration. Upon migrating this change I saw the following error:

C:\dev\fc3>manage.py migrate fantasy
Running migrations for fantasy:

Migrating forwards to 0013_add-team.
fantasy: 0013_add-team
Loading initial data for fantasy.

Error: One or more models did not validate: fantasy.team: 'competitors' specifies an m2m relation through model <class 'fc3.fantasy.models.team_competitors'>, which has not been installed.

I'm using Django trunk, #12293. I'm using the latest South, as of 25 January 2010. The models are:

class Competitor(models.Model):

name = models.CharField?(max_length=100)
series = models.ForeignKey?(Series)

class Team(models.Model):

series = models.ForeignKey?(Series)
name = models.CharField?(max_length=100)
competitors = models.ManyToManyField?(Competitor)

Attachments

Change History

comment:1 Changed 4 years ago by graham@…

The validation problem occurs beginning at Django rev 11883. When using Django rev 11882 there is no problem. Hope this helps!

comment:2 follow-up: ↓ 3 Changed 4 years ago by s.angel+dev@…

Same problem here. Is it resolved with version 0.7 ? When will it be released ?

comment:3 in reply to: ↑ 2 Changed 4 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7

Replying to s.angel+dev@…:

Same problem here. Is it resolved with version 0.7 ? When will it be released ?

I'm not sure if this is a bug in Django core yet or not; that notwithstanding, I can only guarantee it will be fixed before Django 1.2 is released (I don't actively support django versions until they're about to be released, otherwise there's a lot of wild goose chases)

comment:4 Changed 4 years ago by graham@…

Workaround for this is to revert Django to r11612, and using a "stableish" South revision, migrate. Once that is complete update Django to your desired level and proceed.

comment:5 Changed 4 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed

This is fixed in trunk.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.