Fixed #23264: Schema backends honour db_constraint

This commit is contained in:
Andrew Godwin 2014-08-09 17:50:00 +10:00
parent 8fe406864c
commit 27b6f28435
3 changed files with 106 additions and 6 deletions

View file

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