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

Add simplify-search-vector-expression to upgrade 0-32 command #7925

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Oct 21, 2024

Context

Moving this command to the global command runner for 0.32 upgrade. This should fix searchVector expression introduced in 0.31 to later handle soft-deleted + search filter properly.

Test

git co v0.31.0
-- reset DB
git co c--add-simplify-search-vector-expression-to-upgrade-0-32
-- migrate typeorm
-- upgrade 0.32 command

search is working and expression is correctly set. Soft deleted records are not shown as before but it's now possible to override that behavior via filters.

cc @ijreilly

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

thank you !

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR integrates the SimplifySearchVectorExpressionCommand into the UpgradeTo0_32Command process, improving search functionality for version 0.32 upgrades.

  • Moved SimplifySearchVectorExpressionCommand from a separate module to UpgradeTo0_32CommandModule in packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-upgrade-version.module.ts
  • Added execution of SimplifySearchVectorExpressionCommand in UpgradeTo0_32Command class in packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-upgrade-version.command.ts
  • Implemented logic in SimplifySearchVectorExpressionCommand to update search vectors for different object types in packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-simplify-search-vector-expression.ts
  • Removed packages/twenty-server/src/database/commands/upgrade-version/0-31/0-32/0-32-simplify-search-vector-expression.module.ts

5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@Weiko Weiko merged commit edf4ae0 into main Oct 21, 2024
17 checks passed
@Weiko Weiko deleted the c--add-simplify-search-vector-expression-to-upgrade-0-32 branch October 21, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants