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

fix: Add missing fuzzystrmatch extension for levenshtein() method to postgresql schema.sql definition #460

Merged

Conversation

martincik
Copy link
Contributor

Relates to:

No specific issue linked - database schema enhancement

Risks

Low - Adding a PostgreSQL extension that is commonly used for fuzzy string matching. This is a database schema change but only adds functionality without modifying existing structures.

Background

What does this PR do?

Adds the fuzzystrmatch PostgreSQL extension to the database schema. This extension provides several functions for determining similarities between strings and fuzzy string matching.

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes do not require a change to the project documentation, as this is an infrastructure-level change that doesn't affect application interfaces.

Testing

Where should a reviewer start?

  1. Review the schema.sql file in packages/adapter-postgres
  2. Verify the fuzzystrmatch extension installation in a test database

Detailed testing steps

  1. Create a fresh test database
  2. Run the schema.sql migration
  3. Verify the fuzzystrmatch extension is installed by running:
SELECT * FROM pg_extension WHERE extname = 'fuzzystrmatch';

Deploy Notes

Database changes

  • Requires PostgreSQL with fuzzystrmatch extension available
  • Schema change: CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;

Deployment instructions

Standard deployment process applies:

  1. Ensure the PostgreSQL server has fuzzystrmatch extension available
  2. Run schema migrations as normal

@monilpat
Copy link
Collaborator

Thanks for the great description this looks great LGTM!

Copy link
Collaborator

@odilitime odilitime left a comment

Choose a reason for hiding this comment

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

LGTM

@ponderingdemocritus ponderingdemocritus merged commit 30ac76f into elizaOS:main Nov 20, 2024
2 checks passed
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.

4 participants