Changes between Initial Version and Version 1 of Ticket #22125, comment 2


Ignore:
Timestamp:
Jan 13, 2016, 3:52:39 PM (9 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22125, comment 2

    initial v1  
    11Let me clarify.
    22Suppose you have the following code:
    3 
     3{{{
    44class B(models.Model):
    55    pass
     
    77class A(models.Model):
    88    b = models.ManyToManyField(B)
    9 ===========================
     9}}}
    1010
    1111The following SQL is produced:
    1212
    13 
     13{{{
    1414CREATE TABLE "main_b" (
    1515    "id" integer NOT NULL PRIMARY KEY
     
    2929CREATE INDEX "main_a_b_4d6cc2fb" ON "main_a_b" ("a_id");
    3030CREATE INDEX "main_a_b_2c14050b" ON "main_a_b" ("b_id");
    31 
    32 ==============
     31}}}
    3332
    3433Note that the index on a_id is redundant due to the unique constraint on a_id, b_id
Back to Top