mirror of
https://github.com/django/django.git
synced 2025-11-22 20:16:24 +00:00
This commit is contained in:
parent
764af7a3d6
commit
02e7a162a0
2 changed files with 10 additions and 1 deletions
|
|
@ -148,6 +148,12 @@ class DbDefaultModel(models.Model):
|
|||
name = models.CharField(max_length=10)
|
||||
created_at = models.DateTimeField(db_default=Now())
|
||||
|
||||
class Meta:
|
||||
required_db_features = {"supports_expression_defaults"}
|
||||
|
||||
|
||||
class DbDefaultPrimaryKey(models.Model):
|
||||
id = models.DateTimeField(primary_key=True, db_default=Now())
|
||||
|
||||
class Meta:
|
||||
required_db_features = {"supports_expression_defaults"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue