Fix Postgres unit tests on Django 4.1+.
Review Request #13343 — Created Oct. 14, 2023 and submitted — Latest diff uploaded
This fixes the Postgres unit tests for Django 4.1 and 4.2 (mostly).
Django 4.1 changed primary key definitions for models, which this test
now conditionalizes, to go fromserial
tointeger
types. As part of
this, it also dropped some table-rebuilding logic that tried to restore
the serial indexes, which are no longer needed.Django 4.2 inherits these fixes, but breaks in other ways due to new
model meta attributes that we don't currently support. These will be
introduced next.
Ran unit tests for Django 3.2 through 4.2 for SQLite, MySQL, and
Postgres. All unit tests pass, except for the failures mentioned for 4.2.