1
0
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:
Markus Holtermann
2015-01-19 15:31:23 +01:00
parent 0b3e3e21cf
commit e55cb91bd4
4 changed files with 128 additions and 15 deletions

View File

@@ -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)