I checked two popular third party backends and they aren't using it:
* django-mssql-backend: https://github.com/ESSolutions/django-mssql-
backend/blob/master/sql_server/pyodbc/operations.py
* django-cockroachdb: https://github.com/cockroachdb/django-
cockroachdb/blob/master/django_cockroachdb/operations.py
--
Ticket URL: <https://code.djangoproject.com/ticket/31698>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> This was added in 924a89e135fe54bc7622aa6f03405211e75c06e9 to support
> Oracle. However 924a89e135fe54bc7622aa6f03405211e75c06e9 reimplemented
> the Oracle autoincrement keys without `autoinc_sql`.
>
> I checked two popular third party backends and they aren't using it:
>
> * django-mssql-backend: https://github.com/ESSolutions/django-mssql-
> backend/blob/master/sql_server/pyodbc/operations.py
> * django-cockroachdb: https://github.com/cockroachdb/django-
> cockroachdb/blob/master/django_cockroachdb/operations.py
New description:
This was added in 38b5d7f23d8f7a39646a9b298f10941a70585031 and added to
the migrations schema editor in 924a89e135fe54bc7622aa6f03405211e75c06e9.
It was only ever used for Oracle support.
924a89e135fe54bc7622aa6f03405211e75c06e9 reimplemented Oracle
autoincrement keys without `autoinc_sql`, so it has no use in Django core
any more.
I checked two popular third party backends and they aren't using it:
* django-mssql-backend: https://github.com/ESSolutions/django-mssql-
backend/blob/master/sql_server/pyodbc/operations.py
* django-cockroachdb: https://github.com/cockroachdb/django-
cockroachdb/blob/master/django_cockroachdb/operations.py
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
I found usage in
[https://github.com/bryanriosb/DJANGO_HANA_SAP/blob/f03abca6e73abc98d838b21a9880bb42f1941322/django_hana/operations.py
django_hana] and [https://github.com/klinskih/django-
firebird/blob/3a5d3669cd462e16ff7a473c8e1af76516ef082b/firebird/operations.py#L109-L131
django-firebird] so it may still be useful.
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:2>
Comment (by Adam (Chainz) Johnson):
Those packages are last touched 6 and 8 years ago, respectively. Neither
is well documented and there are many database backend changes since the
version they both support (1.4). I don't think it's worth stalling cleanup
for them. Additionally, a custom database backend would be able to
implement equivalent functionality in its own schema editor relatively
easily.
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:3>
Comment (by Tim Graham):
At least [https://github.com/maxirobaina/django-firebird django-firebird]
is still active and linked from our documentation. I suggested to remove
it from our documentation since it hasn't had a release since Django 1.11
but [https://github.com/django/django/pull/12948#issuecomment-632150457
that wasn't accepted].
I don't really care about the fate of this issue but I don't think the
code is adding much maintenance burden to Django and if there are at least
two databases that use this feature, it seems there could be others (I
stopped my github code search after these two hits in as many minutes). It
seems easier to update this logic (like adding 'SmallAutoField') once in
Django, rather than requiring each backend to make that update (although
firebird is currently [https://github.com/maxirobaina/django-
firebird/blob/80a4ea8c80c967bd9a4738d49abdd80f508014b0/firebird/schema.py#L743-L747
copying enough code] in its SchemaEditor that this argument doesn't
apply).
I guess having that code in Django is at least helpful in the sense that
it calls out "if your database has this behavior, do it here."
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:4>
Comment (by Adam (Chainz) Johnson):
> At least django-firebird is still active and linked from our
documentation.
Ah right, it's in a new repo. THat still uses autoinc_sql
> I don't really care about the fate of this issue but I don't think the
code is adding much maintenance burden to Django
Fair, although I just don't like stuff accumulating.
> I stopped my github code search after these two hits in as many minutes
Have you got any hints for github code search? I tried but all I found
were copies of django in committed virtualenvs.
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:5>
Comment (by Tim Graham):
I browsed a few pages of
[https://github.com/search?q=%22def+autoinc_sql%22&type=Code this GitHub
search].
--
Ticket URL: <https://code.djangoproject.com/ticket/31698#comment:6>