Skip to content

Implement auto-created M2M through table create/delete #39

@vgvoleg

Description

@vgvoleg

10. Implement auto-created M2M through table create/delete

Suggested milestone: M3 Django Contrib Smoke

Suggested labels: priority:p0, area:django-contrib, area:schema,
type:enhancement, status:confirmed-gap

Context

Django's base schema editor creates auto-created M2M through tables during
create_model(). The current backend override creates the model table and
indexes, but does not mirror that auto-created through table behavior.

Work

  • Create auto-created M2M through tables after the primary model table.
  • Delete auto-created M2M through tables when deleting models where appropriate.
  • Type through table *_id columns from target primary key fields.
  • Ensure no FK, REFERENCES, or ON DELETE SQL is emitted.
  • Test auto-created through models and custom through models separately.
  • Test target PK types: integer, string, UUID, and big integer.

Acceptance Criteria

  • Auto-created through tables exist after create_model().
  • M2M add/list/remove works at the ORM level.
  • Relation docs match tested behavior.

Dependencies

Blocked by:

  • Make unsupported constraints and schema operations explicit

Unblocks:

  • Add Django contrib smoke test project

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:django-contribDjango contrib apps such as auth/admin/sessionsarea:schemaSchema editor and migrationspriority:p0Blocks public non-beta releasestatus:confirmed-gapGap confirmed from code or behaviortype:enhancementFeature or behavior improvement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions