Skip to content

QueryFailedError: applicationRegistration.logoFileId does not exist when loading applications #23210

Description

@luisalrp

Bug Description

On our self-hosted Twenty instance, application registrations cannot be loaded.

When the frontend executes the FindAllApplicationRegistrations GraphQL query, the backend generates a TypeORM query that selects:

"registration"."logoFileId"

from:

"core"."applicationRegistration"

PostgreSQL rejects the query because the logoFileId column does not exist:

QueryFailedError: column registration.logoFileId does not exist

The error occurs repeatedly whenever the application registrations list is requested.

Relevant log excerpt:

query failed: SELECT
  ...
  "registration"."logoFileId" AS "registration_logoFileId",
  ...
FROM "core"."applicationRegistration" "registration"
WHERE "registration"."deletedAt" IS NULL
ORDER BY "registration_createdAt" DESC, "registration_id" ASC
LIMIT 25 OFFSET 0

error: column registration.logoFileId does not exist

QueryFailedError: column registration.logoFileId does not exist
    at PostgresQueryRunner.query
    at SelectQueryBuilder.loadRawResults
    at SelectQueryBuilder.executeEntitiesAndRawResults
    at SelectQueryBuilder.getManyAndCount
    at ApplicationRegistrationService.findAll

PostgreSQL error code: 42703
PostgreSQL routine: errorMissingColumn

GraphQL operation:
FindAllApplicationRegistrations

Steps to reproduce:

  1. Start Twenty using an existing PostgreSQL database.
  2. Sign in to the workspace.
  3. Open the page that loads the application registrations, such as Settings → Admin Panel → Applications.
  4. Observe that the applications are not loaded.
  5. Click on Synchronize catalog button.
  6. Check the server logs and observe the missing-column error.

Expected behavior

The application registrations query should complete successfully and the applications page should display the available registrations.

Any required database upgrade command should create core.applicationRegistration.logoFileId before the updated server starts querying that column.

Technical inputs

Environment:

Twenty version/image tag: v2.23.2
Previous Twenty version: v2.21.2
Deployment method: Docker compose on Coolify
PostgreSQL version: postgres:16-alpine

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Dev status

None yet

Start date

None yet

Target date

None yet

Quarter

None yet

Projects

Status
In project

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions