• 
      

    Fix Postgres unit tests on Django 4.1+.

    Review Request #13343 — Created Oct. 14, 2023 and submitted

    Information

    Django Evolution
    release-2.x

    Reviewers

    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 from serial to integer 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.

    Summary ID
    Fix Postgres unit tests on Django 4.1+.
    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 from `serial` to `integer` 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.
    628b9f51429913387b9386e96f61b509ded360ca
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.x (5fe7d92)