Opened 5 years ago

Closed 5 years ago

#10767 closed (duplicate)

SQL flush statements are generated for through many to many tables set managed = False

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


SQL flush statements (those output by ./ sqlflush) correctly do not include statements truncating django models marked as managed = False, except for those which are used as the through model for many to many relations (ManyToManyField(through=...)).

I have attached a patch which fixes the issue by excluding through models marked managed = False when creating the list of tables and sequences to flush.

Attachments (1)

check-through-model-for-managed.diff (1.2 KB) - added by trevor 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by trevor

comment:1 Changed 5 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #10647

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.