summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3
diff options
context:
space:
mode:
authorCaio Ariede <caio.ariede@gmail.com>2019-10-16 09:32:12 -0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-19 09:34:11 +0100
commit555bebe7749ab1a72d5141a00f9ce7a602c72298 (patch)
tree54b6414c047c65dd5d4c22e388168d9c9edfb84a /django/db/backends/sqlite3
parentaa12cf07c9202e117712abe2621d901dd6dd94b4 (diff)
Fixed #30987 -- Added models.PositiveBigIntegerField.
Diffstat (limited to 'django/db/backends/sqlite3')
-rw-r--r--django/db/backends/sqlite3/base.py2
-rw-r--r--django/db/backends/sqlite3/introspection.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 51a15ee10a..a3ae1f048e 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -102,6 +102,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'GenericIPAddressField': 'char(39)',
'NullBooleanField': 'bool',
'OneToOneField': 'integer',
+ 'PositiveBigIntegerField': 'bigint unsigned',
'PositiveIntegerField': 'integer unsigned',
'PositiveSmallIntegerField': 'smallint unsigned',
'SlugField': 'varchar(%(max_length)s)',
@@ -112,6 +113,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'UUIDField': 'char(32)',
}
data_type_check_constraints = {
+ 'PositiveBigIntegerField': '"%(column)s" >= 0',
'PositiveIntegerField': '"%(column)s" >= 0',
'PositiveSmallIntegerField': '"%(column)s" >= 0',
}
diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py
index 5186e6d14b..2b5e732a47 100644
--- a/django/db/backends/sqlite3/introspection.py
+++ b/django/db/backends/sqlite3/introspection.py
@@ -37,6 +37,7 @@ class FlexibleFieldLookupDict:
'integer': 'IntegerField',
'bigint': 'BigIntegerField',
'integer unsigned': 'PositiveIntegerField',
+ 'bigint unsigned': 'PositiveBigIntegerField',
'decimal': 'DecimalField',
'real': 'FloatField',
'text': 'TextField',