Reduce dependencies on activity and revisions tables#23612
Merged
ComfortablyCoding merged 16 commits intomainfrom Oct 16, 2024
Merged
Reduce dependencies on activity and revisions tables#23612ComfortablyCoding merged 16 commits intomainfrom
ComfortablyCoding merged 16 commits intomainfrom
Conversation
* Add directus_comments migration * Add comments controller and service * Remove from activity * Update system-data and types * Refactor app with new endpoints * Expose service * Update app minimal permissions * Add collection translation * Define relations * Allow comment creation only if there's item read access * Patch for MSSQL double constraints issue * Fix users service test * Add sdk support * Update specs * Fix formatting * Fix specs error * Patch whoopsie * Remove obsolete GraphQL mutations * Update required fields * Remove unused vars * Allow edit and delete of legacy activity comments * Remove legacy comments from SDK * Add changeset * Batch upwards migration * Update SDK to use keysOrQuery Co-authored-by: Brainslug <[email protected]> * Update implementation for keysOrQuery * Remove singleton check * Update SDK to use keysOrQuery 2 Co-authored-by: Brainslug <[email protected]> * Update keysOrQuery typedoc * Fix import * Update migration timestamp * fixed import * Update api/src/utils/get-service.ts * utilize chunk processing in migration * formatting * only services extended from itemservice should be added * remove redundant checks from comment header * update comment service to v11 permission format * specify missing required fields * Mock comments in users test * Simplify migration and update date * WIP legacy access * Optimise imports * WIP app cleanup * Update loadUserPreviews typing Co-authored-by: Daniel Biegler <[email protected]> * Read legacy comments * Parse using comments service * Perform migration directly * Fix legacy app sort query which uses id * Migrate legacy comments in mutations * Reduce api semver * Update app recommended permissions * Recommend updating of comment only * replace hardcoded type with existing one * Allow users to update or delete their own comments Co-authored-by: daedalus <[email protected]> * Skip further access validation for non-existent collections * Check if collection exists before the admin check Co-authored-by: daedalus <[email protected]> * Fix incorrect legacy check Co-authored-by: Daniel Biegler <[email protected]> * Fix merging of count when db returns count as string type * Remove unused import --------- Co-authored-by: Brainslug <[email protected]> Co-authored-by: Pascal Jufer <[email protected]> Co-authored-by: Brainslug <[email protected]> Co-authored-by: daedalus <[email protected]> Co-authored-by: Daniel Biegler <[email protected]>
* Add migration * Use the new delta field * Add cast-json flag * Fix typing * Fetch existing deltas if version created during migration * Add changeset * Add version delta field into sdk schema * Update migration timestamp * Update versions.save() to return finalVersionDelta Co-authored-by: Pascal Jufer <[email protected]> * Sort on DB level * Update migration date * Disallow passing delta via create/update * Update docs & specs * Fix save response * Remove unnecessary access check Already checked by the subsequent itemsService.readOne call * Update changeset * Don't require update perms on versions for save * Optimize validateCreateData * update to new validateAccess * Update docs/reference/system/versions.md * Remove migration of delta * Rename to legacy * Add missed changes for Remove migration of delta in 2e2f50f * Update docs/reference/system/versions.md --------- Co-authored-by: Pascal Jufer <[email protected]> Co-authored-by: daedalus <[email protected]>
🦋 Changeset detectedLatest commit: 5e291ad The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
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 |
Docs for new directus_comments collection
This was referenced Sep 19, 2024
vwasteels
pushed a commit
to Agence-Indivisible/directus
that referenced
this pull request
Dec 5, 2024
* Extract comments to a separate table (directus#22295) * Add directus_comments migration * Add comments controller and service * Remove from activity * Update system-data and types * Refactor app with new endpoints * Expose service * Update app minimal permissions * Add collection translation * Define relations * Allow comment creation only if there's item read access * Patch for MSSQL double constraints issue * Fix users service test * Add sdk support * Update specs * Fix formatting * Fix specs error * Patch whoopsie * Remove obsolete GraphQL mutations * Update required fields * Remove unused vars * Allow edit and delete of legacy activity comments * Remove legacy comments from SDK * Add changeset * Batch upwards migration * Update SDK to use keysOrQuery Co-authored-by: Brainslug <[email protected]> * Update implementation for keysOrQuery * Remove singleton check * Update SDK to use keysOrQuery 2 Co-authored-by: Brainslug <[email protected]> * Update keysOrQuery typedoc * Fix import * Update migration timestamp * fixed import * Update api/src/utils/get-service.ts * utilize chunk processing in migration * formatting * only services extended from itemservice should be added * remove redundant checks from comment header * update comment service to v11 permission format * specify missing required fields * Mock comments in users test * Simplify migration and update date * WIP legacy access * Optimise imports * WIP app cleanup * Update loadUserPreviews typing Co-authored-by: Daniel Biegler <[email protected]> * Read legacy comments * Parse using comments service * Perform migration directly * Fix legacy app sort query which uses id * Migrate legacy comments in mutations * Reduce api semver * Update app recommended permissions * Recommend updating of comment only * replace hardcoded type with existing one * Allow users to update or delete their own comments Co-authored-by: daedalus <[email protected]> * Skip further access validation for non-existent collections * Check if collection exists before the admin check Co-authored-by: daedalus <[email protected]> * Fix incorrect legacy check Co-authored-by: Daniel Biegler <[email protected]> * Fix merging of count when db returns count as string type * Remove unused import --------- Co-authored-by: Brainslug <[email protected]> Co-authored-by: Pascal Jufer <[email protected]> Co-authored-by: Brainslug <[email protected]> Co-authored-by: daedalus <[email protected]> Co-authored-by: Daniel Biegler <[email protected]> * Consolidate content versioning (directus#22413) * Add migration * Use the new delta field * Add cast-json flag * Fix typing * Fetch existing deltas if version created during migration * Add changeset * Add version delta field into sdk schema * Update migration timestamp * Update versions.save() to return finalVersionDelta Co-authored-by: Pascal Jufer <[email protected]> * Sort on DB level * Update migration date * Disallow passing delta via create/update * Update docs & specs * Fix save response * Remove unnecessary access check Already checked by the subsequent itemsService.readOne call * Update changeset * Don't require update perms on versions for save * Optimize validateCreateData * update to new validateAccess * Update docs/reference/system/versions.md * Remove migration of delta * Rename to legacy * Add missed changes for Remove migration of delta in 2e2f50f * Update docs/reference/system/versions.md --------- Co-authored-by: Pascal Jufer <[email protected]> Co-authored-by: daedalus <[email protected]> * Update migration dates * api change should be major for versioning * Remove comment paths from activity reference * Added comments reference * Added directus_comments to table of system collections * The linter demands newline * Revert function renaming for patch semver * Use transaction in down migration for comments (directus#23715) --------- Co-authored-by: Brainslug <[email protected]> Co-authored-by: Pascal Jufer <[email protected]> Co-authored-by: Brainslug <[email protected]> Co-authored-by: daedalus <[email protected]> Co-authored-by: Daniel Biegler <[email protected]> Co-authored-by: Kevin Lewis <[email protected]> Co-authored-by: Rijk van Zanten <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
What's changed:
Potential Risks / Drawbacks
Review Notes / Questions
P1 for issue #23166
Closes SER-268