Skip to content

configvalue column in oc_appconfig_ex is character varying(255) in PostgreSQL #662

@janepie

Description

@janepie

Describe the bug

The configvalue column in oc_appconfig_ex is character varying(255) in PostgreSQL, it should be TEXT as specified in the code. This means strings put into the table cannot be longer than 255 characters, which breaks context_agent

Steps/Code to Reproduce

  1. Have a server that uses PostgreSQL as db
  2. Install assistant and context_agent (newest versions)
  3. The settings values for context_agent cannot be put into oc_appconfig_ex as the string is too long
  4. Context Agent crashes when trying to use Chat with AI

Expected Results

All working as expected

Actual Results

Error message
DbalException An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(255) Failed to insert appconfig_ex value. Error: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(255)

Table properties

Table "public.oc_appconfig_ex"
Column | Type | Collation | Nullable | Default
-------------+------------------------+-----------+----------+---------------------------------------------
id | bigint | | not null | nextval('oc_appconfig_ex_id_seq'::regclass)
appid | character varying(32) | | not null |
configkey | character varying(64) | | not null |
configvalue | character varying(255) | | | NULL::character varying
sensitive | smallint | | not null | 0
Indexes:
"oc_appconfig_ex_pkey" PRIMARY KEY, btree (id)
"appconfig_ex__configkey" btree (configkey)
"appconfig_ex__idx" UNIQUE, btree (appid, configkey)

Setup configuration

see tech preview

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions