Opened 16 years ago

Closed 16 years ago

#10767 closed (duplicate)

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

Reported by: Trevor Caira 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: no UI/UX: no

Description

SQL flush statements (those output by ./manage.py 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 Caira 16 years ago.

Download all attachments as: .zip

Change History (2)

by Trevor Caira, 16 years ago

comment:1 by Jacob, 16 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #10647

Note: See TracTickets for help on using tickets.
Back to Top