Changes between Version 1 and Version 2 of Ticket #24934


Ignore:
Timestamp:
Jun 5, 2015, 7:16:53 AM (9 years ago)
Author:
user0007
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24934 – Description

    v1 v2  
    55
    66{{{
     7    user = models.ForeignKey(User)
     8    product = models.ForeignKey(Product)
     9
    710    class Meta:
    811        unique_together = ('user', 'product')
    912}}}
    1013
    11 the table was created successfully. Later I removed unique_together from my model:
     14the table was created successfully with following indexes:
     15
     16{{{
     17PRIMARY                                     |            1 | id
     18myapp_mymodel_user_id_16c33dde7f7257bb_uniq |            1 | user_id
     19myapp_mymodel_user_id_16c33dde7f7257bb_uniq |            2 | product_id
     20myapp_mymodel_1ba366c5                      |            1 | user_id
     21myapp_mymodel_9bea82de                      |            1 | product_id
     22}}}
     23
     24Later I removed unique_together from my model:
    1225
    1326{{{
     
    1629}}}
    1730
    18 so Django created migration:
     31so Django generated a migration:
    1932
    2033{{{
Back to Top