Skip to content

Commit 8bf0154

Browse files
committed
Revert native UUID changes
Native UUID requires more work to be more stable, reverting until the required changes are made. For example, the last migrations in the list below results in the following incorrect SQL: ALTER TABLE [ProcessTask] ADD DEFAULT 8017c963-68eb-4bde-babd-27fbd7240fc2 FOR [attempt] operations = [ migrations.CreateModel( name='UUIDModel', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('other', models.UUIDField(null=True)), ], ), migrations.AlterField( model_name='uuidmodel', name='other', field=models.UUIDField(default=uuid.uuid4), ), ]
1 parent 4c5c55c commit 8bf0154

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='django-mssql-backend',
20-
version='2.4.1',
20+
version='2.4.2',
2121
description='Django backend for Microsoft SQL Server',
2222
long_description=open('README.rst').read(),
2323
author='ES Solutions AB',

sql_server/pyodbc/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
9797
'SmallIntegerField': 'smallint',
9898
'TextField': 'nvarchar(max)',
9999
'TimeField': 'time',
100-
'UUIDField': 'char(36)',
100+
'UUIDField': 'char(32)',
101101
}
102102
data_type_check_constraints = {
103103
'PositiveIntegerField': '[%(column)s] >= 0',

sql_server/pyodbc/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
class DatabaseFeatures(BaseDatabaseFeatures):
6-
has_native_uuid_field = True
6+
has_native_uuid_field = False
77
allow_sliced_subqueries_with_in = False
88
can_introspect_autofield = True
99
can_introspect_small_integer_field = True

0 commit comments

Comments
 (0)