Skip to content

refactor: remove UUID field from ComponentVersionContent#404

Merged
ormsbee merged 1 commit intoopenedx:mainfrom
ormsbee:remove-cvc-uuid
Oct 2, 2025
Merged

refactor: remove UUID field from ComponentVersionContent#404
ormsbee merged 1 commit intoopenedx:mainfrom
ormsbee:remove-cvc-uuid

Conversation

@ormsbee
Copy link
Contributor

@ormsbee ormsbee commented Oct 2, 2025

It's wasteful to have a UUID on this join table, as we already have
a unique way to address everything in it by the unique combination
of the ComponentVersion (PublishableEntityVersion) and the
ComponentVersionContent.key (file path).

Dropping this column may cause transient errors for some sites if
someone is creating components after the column was dropped, but
before the new app code is live. UUIDs are generated on the Python
side, so Django will try to generate a UUID to put into a column
that has already been dropped on the database side.

That being said, this window of time should be small, and this
feature is not in widespread use yet. I don't think a more complex
migration is warranted.

It's wasteful to have a UUID on this join table, as we already have
a unique way to address everything in it by the unique combination
of the ComponentVersion (PublishableEntityVersion) and the
ComponentVersionContent.key (file path).

Dropping this column may cause transient errors for some sites if
someone is creating components after the column was dropped, but
before the new app code is live. UUIDs are generated on the Python
side, so Django will try to generate a UUID to put into a column
that has already been dropped on the database side.

That being said, this window of time should be small, and this
feature is not in widespread use yet. I don't think a more complex
migration is warranted.
@ormsbee ormsbee merged commit febbd1e into openedx:main Oct 2, 2025
11 checks passed
@ormsbee ormsbee deleted the remove-cvc-uuid branch October 2, 2025 16:31
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

Comments