Changes between Version 1 and Version 2 of Ticket #24934
- Timestamp:
- Jun 5, 2015, 7:16:53 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24934 – Description
v1 v2 5 5 6 6 {{{ 7 user = models.ForeignKey(User) 8 product = models.ForeignKey(Product) 9 7 10 class Meta: 8 11 unique_together = ('user', 'product') 9 12 }}} 10 13 11 the table was created successfully. Later I removed unique_together from my model: 14 the table was created successfully with following indexes: 15 16 {{{ 17 PRIMARY | 1 | id 18 myapp_mymodel_user_id_16c33dde7f7257bb_uniq | 1 | user_id 19 myapp_mymodel_user_id_16c33dde7f7257bb_uniq | 2 | product_id 20 myapp_mymodel_1ba366c5 | 1 | user_id 21 myapp_mymodel_9bea82de | 1 | product_id 22 }}} 23 24 Later I removed unique_together from my model: 12 25 13 26 {{{ … … 16 29 }}} 17 30 18 so Django createdmigration:31 so Django generated a migration: 19 32 20 33 {{{