Skip to content

Module doesn't work on Postgres #201

@elliot-sawyer

Description

@elliot-sawyer

[2023-08-08 04:07:32] error-log.ERROR: Couldn't run query: INSERT INTO "Package" ("ClassName", "Name", "Version", "Type", "Description", "Supported", "LastEdited", "Created") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ERROR: value too long for type character varying(255) {"exception":"[object] (SilverStripe\\ORM\\Connect\\DatabaseException(code: 0): Couldn't run query:\n\nINSERT INTO \"Package\"\n (\"ClassName\", \"Name\", \"Version\", \"Type\", \"Description\", \"Supported\", \"LastEdited\", \"Created\")\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8)\n\nERROR: value too long for type character varying(255) at /var/www/html/vendor/silverstripe/framework/src/ORM/Connect/DBConnector.php:64)"} []

Issue seems to be when one of the fields (guessing Description) contains a value that's too long to fit in the column. MySQL will truncate the value to fit, while Postgres will reject it for being too long

To get around this, I passed in the following YML:


BringYourOwnIdeas\Maintenance\Model\Package:
  db:
    Name: Text
    Description: Text
    Version: Text
    Type: Text

Not sure I should make a PR for this, since Postgres isn't a requirement to run, but leaving this here in case it helps someone else

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions