Code

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#9804 closed (fixed)

sqlflush fails for ManyToMany with inherited intermediary

Reported by: jdimov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.0
Severity: Keywords: ManyToMany, sqlflush, sequence_list
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's a bug in the sequence_list method of django.db.backends.BaseDatabaseIntrospection, but I don't know how to fix it. It has to do with Many-to-Many relationships through intermediary models, where the intermediary model itself is inherited from a non-abstract base model. In this case, the sequnece_list contains id sequence counter which do not (and should not) actually exist, because the model uses the base model's id counter.

The result of all this is that the manage.py sqlflush command fails, and I can't run my tests.

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by russellm

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

(In [10552]) Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.

comment:3 Changed 5 years ago by russellm

(In [10553]) [1.0.X] Fixed #9804 -- Corrected the introspection of sequence names. This was causing problems when flushing tables that had many-to-many relations through an inherited table. Thanks to jdimov for the report.

Merge of r10552 from trunk.

comment:4 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.