Opened 8 months ago

Closed 8 months ago

Last modified 4 months ago

#36052 closed New feature (fixed)

Add support for CompositePrimaryKey in inspectdb

Reported by: Jacob Walls Owned by: Jacob Walls
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

We can now replace the half-measure created when introspecting a composite primary key with the actual field.

PR

Change History (7)

comment:1 by Tim Graham, 8 months ago

Triage Stage: UnreviewedAccepted

comment:2 by Sarah Boyce, 8 months ago

Triage Stage: AcceptedReady for checkin

comment:3 by Sarah Boyce <42296566+sarahboyce@…>, 8 months ago

Resolution: fixed
Status: assignedclosed

In a8e4fd11:

Fixed #36052 -- Supported CompositePrimaryKey in inspectdb.

comment:4 by nessita <124304+nessita@…>, 4 months ago

In 4c758581:

Refs #36052, #32234 -- Removed create_test_table_with_composite_primary_key flag in favor of using CompositePrimaryKey.

Now that Django properly supports creating models with composite primary
keys, the tests should use a CompositePrimaryKey field instead of a
feature flag to inline backend specific SQL for creating a composite PK.

Specifcially, the inspectdb's test_composite_primary_key was adjusted to
use schema editor instead of per-backend raw SQL.

comment:5 by Natalia <124304+nessita@…>, 4 months ago

In 5d03c71b:

[5.2.x] Refs #36052, #32234 -- Removed create_test_table_with_composite_primary_key flag in favor of using CompositePrimaryKey.

Now that Django properly supports creating models with composite primary
keys, the tests should use a CompositePrimaryKey field instead of a
feature flag to inline backend specific SQL for creating a composite PK.

Specifcially, the inspectdb's test_composite_primary_key was adjusted to
use schema editor instead of per-backend raw SQL.

Backport of 4c75858135589f3a00e32eb4d476074536371a32 from main.

comment:6 by GitHub <noreply@…>, 4 months ago

In dd133054:

Refs #36052, #32234 -- Fixed inspectdb tests for CompositePrimaryKey on Oracle.

Tests regression in 4c75858135589f3a00e32eb4d476074536371a32.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 4 months ago

In 44bda7a6:

[5.2.x] Refs #36052, #32234 -- Fixed inspectdb tests for CompositePrimaryKey on Oracle.

Tests regression in 4c75858135589f3a00e32eb4d476074536371a32.
Backport of dd133054cb98f77577c06d7ef1f2391a865784bc from main

Note: See TracTickets for help on using tickets.
Back to Top