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: Shorten Indexes #5045

Conversation

michael-genson
Copy link
Collaborator

What this PR does / why we need it:

(REQUIRED)

We index some properties that can get arbitrarily long (e.g. the recipe description). This breaks on PSQL: https://www.postgresql.org/docs/current/btree.html

This PR caps all normalized properties to 255 characters, and removes the index for instruction text. 255 characters is probably aggressive, but the only real downside to this is in searching recipes for text in descriptions longer than this paragraph.

The migration also retroactively truncates normalized properties that were too long, so the data should be in a healthy state immediately.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #3181
Fixes #5041

Testing

(fill-in or delete this section)

Ran the migration manually

@hay-kot hay-kot enabled auto-merge (squash) February 11, 2025 15:45
@hay-kot hay-kot merged commit cb9008b into mealie-recipes:mealie-next Feb 11, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants