Skip to content

Commit

Permalink
Revert native UUID changes
Browse files Browse the repository at this point in the history
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),
    ),
]
  • Loading branch information
OskarPersson committed Nov 29, 2019
1 parent 4c5c55c commit 8bf0154
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -17,7 +17,7 @@

setup(
name='django-mssql-backend',
version='2.4.1',
version='2.4.2',
description='Django backend for Microsoft SQL Server',
long_description=open('README.rst').read(),
author='ES Solutions AB',
Expand Down
2 changes: 1 addition & 1 deletion sql_server/pyodbc/base.py
Expand Up @@ -97,7 +97,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'SmallIntegerField': 'smallint',
'TextField': 'nvarchar(max)',
'TimeField': 'time',
'UUIDField': 'char(36)',
'UUIDField': 'char(32)',
}
data_type_check_constraints = {
'PositiveIntegerField': '[%(column)s] >= 0',
Expand Down
2 changes: 1 addition & 1 deletion sql_server/pyodbc/features.py
Expand Up @@ -3,7 +3,7 @@


class DatabaseFeatures(BaseDatabaseFeatures):
has_native_uuid_field = True
has_native_uuid_field = False
allow_sliced_subqueries_with_in = False
can_introspect_autofield = True
can_introspect_small_integer_field = True
Expand Down

0 comments on commit 8bf0154

Please sign in to comment.