Skip to content

INTPYTHON-916 Serialize embedded model references in migrations as strings#496

Merged
timgraham merged 1 commit into
mongodb:mainfrom
timgraham:serialize-embedded-model-refs-to-string
Mar 12, 2026
Merged

INTPYTHON-916 Serialize embedded model references in migrations as strings#496
timgraham merged 1 commit into
mongodb:mainfrom
timgraham:serialize-embedded-model-refs-to-string

Conversation

@timgraham

Copy link
Copy Markdown
Collaborator

No description provided.

@timgraham
timgraham force-pushed the serialize-embedded-model-refs-to-string branch 2 times, most recently from 6bf08ce to 6f592f7 Compare February 24, 2026 15:59
@timgraham
timgraham marked this pull request as ready for review February 24, 2026 16:22
@aclark4life

Copy link
Copy Markdown
Collaborator

@timgraham Does this fix fixtures (i.e. dump_data, load_data) too or is that a separate issue?

@timgraham

Copy link
Copy Markdown
Collaborator Author

@timgraham Does this fix fixtures (i.e. dump_data, load_data) too or is that a separate issue?

It's unrelated.

@aclark4life
aclark4life removed the request for review from caseyclements March 4, 2026 22:17
@timgraham
timgraham requested a review from aclark4life March 9, 2026 15:29
Comment thread docs/releases/6.0.x.rst Outdated
databases.
- Made ``makemigrations`` serialize embedded model references as strings so
that references in existing migrations don't need to be adjusted if models
are later removed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why/how does serializing fix references in existing migrations ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "existing migrations", I mean migrations created before models are removed, not "migrations that were created before this fix." Probably it would be clearer to remove the word "existing" in this note.

@aclark4life aclark4life left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timgraham
timgraham force-pushed the serialize-embedded-model-refs-to-string branch from 6f592f7 to a766be5 Compare March 12, 2026 01:02
@timgraham
timgraham merged commit a766be5 into mongodb:main Mar 12, 2026
21 checks passed
@timgraham
timgraham deleted the serialize-embedded-model-refs-to-string branch March 12, 2026 11:07
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