Skip to content

INTPYTHON-796 Add support for embedded model field in migrations - #518

Closed
timgraham wants to merge 4 commits into
mongodb:mainfrom
timgraham:emf-migrations
Closed

timgraham wants to merge 4 commits into
mongodb:mainfrom
timgraham:emf-migrations

Conversation

@timgraham

@timgraham timgraham commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

(Originally, this PR worked with changes to the Django fork: mongodb-forks/django#19, but the approach has been reworked so we don't need to add any hooks in Django's MigrationAutodetector.)

Handoff status:

  • At first, I thought it might be okay to release EmbeddedModelField support without EmbeddedModelArrayField, hence the commit "Prevent Embedded operations for EmbeddedModelArrayField", but then I thought against it in case any APIs needed to be changed. The EmbeddedModelArrayField work is mostly Claude generated and needs to be reviewed.
  • Some time after the initial implementation, I thought about the "Avoid double prompting for defaults" problem. Claude wrote that and I didn't check it carefully either. At least documentation updates are needed.
  • My thinking is to do polymorphic migration support separately.

@timgraham
timgraham force-pushed the django61 branch 2 times, most recently from 8572482 to 6663337 Compare April 21, 2026 01:28
@timgraham
timgraham force-pushed the emf-migrations branch 2 times, most recently from 42eb7e7 to 3b0ecb0 Compare May 3, 2026 00:51
@timgraham
timgraham force-pushed the emf-migrations branch 2 times, most recently from 5a47864 to ad5cd01 Compare May 17, 2026 01:13
@timgraham
timgraham changed the base branch from django61 to main May 22, 2026 19:16
@timgraham
timgraham force-pushed the emf-migrations branch 2 times, most recently from 7065ee2 to 5379053 Compare June 30, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants