summaryrefslogtreecommitdiff
path: root/tests/schema/models.py
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-08-09 17:50:00 +1000
committerAndrew Godwin <andrew@aeracode.org>2014-08-09 17:51:06 +1000
commitee74f9fe3bcd8c2648e4623d5929fceac851b97f (patch)
tree577ab8e91e48b5d4a518a8e5c8740d311ae367a6 /tests/schema/models.py
parent98d6f128d0fd5aec0c8d49da273e369e8345a726 (diff)
[1.7.x] Fixed #23264: Schema backends honour db_constraint
Diffstat (limited to 'tests/schema/models.py')
-rw-r--r--tests/schema/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/schema/models.py b/tests/schema/models.py
index c3d6593c99..ece07194b4 100644
--- a/tests/schema/models.py
+++ b/tests/schema/models.py
@@ -50,6 +50,15 @@ class Book(models.Model):
apps = new_apps
+class BookWeak(models.Model):
+ author = models.ForeignKey(Author, db_constraint=False)
+ title = models.CharField(max_length=100, db_index=True)
+ pub_date = models.DateTimeField()
+
+ class Meta:
+ apps = new_apps
+
+
class BookWithM2M(models.Model):
author = models.ForeignKey(Author)
title = models.CharField(max_length=100, db_index=True)