summaryrefslogtreecommitdiff
path: root/tests/schema/models.py
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2015-01-19 15:31:23 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2015-01-19 16:55:25 +0100
commite55cb91bd47d054d502c03cdbe74ac98986af3fb (patch)
treec4ede60eeae113ef24b436b0c536640bcaa494cb /tests/schema/models.py
parent0b3e3e21cfe7463245dc1dfc9258e18903bc1116 (diff)
[1.8.x] Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Ɓukasz Harasimowicz for the report. Backport of 5792e6a88c1444d4ec84abe62077338ad3765b80 from master
Diffstat (limited to 'tests/schema/models.py')
-rw-r--r--tests/schema/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/schema/models.py b/tests/schema/models.py
index df8a1c5ce4..6eba7ccae1 100644
--- a/tests/schema/models.py
+++ b/tests/schema/models.py
@@ -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)