You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
The text was updated successfully, but these errors were encountered:
Hi, thanks for this.
We probably don't want the description being truncated - if that is the only field being problematic, I'd support a pull request that changes the db type for Description to Text.
If you'd like to submit a pull request making that change, I'll happily review it.
[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:
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
The text was updated successfully, but these errors were encountered: