mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
[1.8.x] Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Łukasz Harasimowicz for the report.
Backport of 5792e6a88c from master
This commit is contained in:
@@ -67,6 +67,16 @@ class BookWeak(models.Model):
|
||||
apps = new_apps
|
||||
|
||||
|
||||
class BookWithO2O(models.Model):
|
||||
author = models.OneToOneField(Author)
|
||||
title = models.CharField(max_length=100, db_index=True)
|
||||
pub_date = models.DateTimeField()
|
||||
|
||||
class Meta:
|
||||
apps = new_apps
|
||||
db_table = "schema_book"
|
||||
|
||||
|
||||
class BookWithM2M(models.Model):
|
||||
author = models.ForeignKey(Author)
|
||||
title = models.CharField(max_length=100, db_index=True)
|
||||
|
||||
Reference in New Issue
Block a user