Skip to content

Issues adding snippet in Wagtail with primary key longer than 50 characters #70

Description

@pcraciunoiu

Caught this error for a custom Snippet with this key:

class CustomSnippet(index.Indexed, Model):
    value = models.CharField(max_length=128, primary_key=True)

It happened during INSERT INTO wagtailsearch_indexentry

Exception raised while adding CustomSnippet() into the 'default' search backend
DataError: value too long for type character varying(50)

It seems that if a snippet has a PK longer than 50 characters, the IndexEntry insert fails, could we bump that to a higher number?

Not a blocker, it just seems a bit low.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions