Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate content versioning #22227

Merged
merged 7 commits into from May 6, 2024
Merged

Conversation

licitdev
Copy link
Member

Scope

What's changed:

  • Added a new delta field to the directus_versions table
    • Contains the final delta which is the combination of all revisions

Potential Risks / Drawbacks

  • Updates to existing revisions during the migration may result in an incorrect final delta stored
    • This happens when an existing instance of Directus is performing the patch
    • The final delta could be fully repopulated in a subsequent release

Review Notes / Questions

  • The existing versions field in the directus_revisions table will be removed in a subsequent release
  • If the delta field in directus_versions is empty, the existing behaviour of fetching from directus_revisions remains
  • Needs further testing to ensure content versioning remains fully operational

Related to #17894

Copy link

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: d50f17a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@directus/system-data Patch
@directus/types Patch
@directus/api Patch
@directus/sdk Patch
@directus/utils Patch
@directus/composables Patch
@directus/extensions-sdk Patch
@directus/extensions Patch
@directus/themes Patch
@directus/validation Patch
directus Patch
@directus/env Patch
@directus/extensions-registry Patch
@directus/memory Patch
@directus/pressure Patch
@directus/storage-driver-azure Patch
@directus/storage-driver-cloudinary Patch
@directus/storage-driver-gcs Patch
@directus/storage-driver-s3 Patch
@directus/storage-driver-supabase Patch
create-directus-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@licitdev licitdev requested a review from br41nslug April 17, 2024 16:35
@licitdev licitdev marked this pull request as ready for review April 18, 2024 08:45
@licitdev licitdev requested a review from paescuj May 6, 2024 13:46
@br41nslug br41nslug self-assigned this May 6, 2024
Copy link
Member

@br41nslug br41nslug left a comment

Choose a reason for hiding this comment

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

So far working well in my tests versions get properly migrated and seem to function as expected/before in my tests.

Just this one question about the fallback but thats not a blocker as it should already be an edge case to get there.

api/src/controllers/versions.ts Show resolved Hide resolved
api/src/services/versions.ts Show resolved Hide resolved
api/src/services/versions.ts Show resolved Hide resolved
@br41nslug br41nslug merged commit 5a258dd into main May 6, 2024
4 checks passed
@br41nslug br41nslug deleted the consolidate-content-versioning branch May 6, 2024 19:02
@github-actions github-actions bot added this to the Next Release milestone May 6, 2024
paescuj added a commit that referenced this pull request May 7, 2024
licitdev pushed a commit that referenced this pull request May 7, 2024
@licitdev licitdev restored the consolidate-content-versioning branch May 7, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants