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

Extract comments to a separate table #22295

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Extract comments to a separate table #22295

wants to merge 35 commits into from

Conversation

licitdev
Copy link
Member

@licitdev licitdev commented Apr 23, 2024

Scope

What's changed:

  • A new directus_comments table for comments

Potential Risks / Drawbacks

  • Existing users reading into comments outside of the data studio will have to update their usage

Review Notes / Questions

  • The comment field is now a required field
  • Activity and revisions now exist for tracking
  • Some additional logic is added in the app to continue supporting legacy comments that are added during the migration
  • Should existing SDK & GQL remain unchanged until an upcoming version when the comment field is dropped from activity?
  • Instead of removing the /activity/comment API, should an error message similar to the one in webhooks be added?
    throw new (createError(ErrorCode.MethodNotAllowed, 'Webhooks are deprecated, use Flows instead', 405))();

Related to #17894

Copy link

changeset-bot bot commented Apr 23, 2024

🦋 Changeset detected

Latest commit: a7aaf23

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

This PR includes changesets to release 23 packages
Name Type
@directus/api Major
@directus/sdk Major
@directus/system-data Minor
@directus/specs Minor
@directus/types Minor
@directus/app Minor
directus Patch
@directus/composables Patch
@directus/utils Patch
@directus/extensions-sdk Patch
@directus/extensions Patch
@directus/themes Patch
@directus/validation 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 changed the title Extract comments to separate table Extract comments to a separate table Apr 24, 2024
@licitdev licitdev marked this pull request as ready for review April 26, 2024 08:39
@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.

This PR will require some updated to the API reference docs and a breaking change note to cover the updated API.

Not sure if this is an issue in my setup or this PR but i was getting some infinite getSchema loop errors while attempting to run bootstrap until i disabled CACHE_SCHEMA
Code_AQXxQUmlyd

sdk/src/rest/commands/update/comments.ts Outdated Show resolved Hide resolved
api/src/controllers/comments.ts Outdated Show resolved Hide resolved
api/src/controllers/comments.ts Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Do we have some form of timeout on migrations? if so then this loop may run into that for larger projects 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

No, there isn't. CC @wrynegade

api/src/services/graphql/index.ts Show resolved Hide resolved
sdk/src/rest/commands/delete/comments.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants