diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4837606..336cd81 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,12 @@ jobs: max-parallel: 5 matrix: python-version: ['3.7', '3.8', '3.9', '3.10'] - django-version: ['3.2', '4.0'] + django-version: ['3.2', '4.0', '4.1'] exclude: - django-version: '4.0' python-version: '3.7' + - django-version: '4.1' + python-version: '3.7' include: - django-version: 'main' python-version: '3.9' diff --git a/.gitignore b/.gitignore index b5e9346..fd8a5d0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ doc/_build/ coverage.xml **/.env examples/**/migrations/* +.idea/ \ No newline at end of file diff --git a/django_redshift_backend/base.py b/django_redshift_backend/base.py index df6cf2b..2e1ff33 100644 --- a/django_redshift_backend/base.py +++ b/django_redshift_backend/base.py @@ -1092,6 +1092,10 @@ class DatabaseWrapper(BasePGDatabaseWrapper): data_types = deepcopy(BasePGDatabaseWrapper.data_types) data_types.update(redshift_data_types) + # Clear suffixes to rid of PostgreSQLs GENERATED BY DEFAULT AS IDENTITY that upset Redshift. + # Takes effect on Django>=4.1. Older version have this attribute empty + data_types_suffix = {} + def __init__(self, *args, **kwargs): super(DatabaseWrapper, self).__init__(*args, **kwargs) diff --git a/tox.ini b/tox.ini index 793d3db..6f3c016 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,7 @@ python = DJANGO = 3.2: dj32 4.0: dj40 + 4.1: dj41 main: djmain [testenv]