T
Twenty3mo ago
Crosp

Upgrade 0.22 -> 0.23

Hi, I'm facing an issue during the upgrade from a 0.22 to 0.23 instance. Following upgrade guide, during the yarn comand:prod upgrade-0.23 command:
[Nest] 284 - 02/18/2025, 3:32:47 PM LOG [UpdateActivitiesCommand] Running command on workspace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx failed
[Nest] 284 - 02/18/2025, 3:32:47 PM ERROR [UpdateActivitiesCommand] Migration failed for workspace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: No metadata for "task" was found., EntityMetadataNotFoundError: No metadata for "task" was found.
at WorkspaceDataSource.getMetadata (/app/node_modules/typeorm/data-source/DataSource.js:304:19)
at get metadata [as metadata] (/app/node_modules/typeorm/repository/Repository.js:15:40)
at WorkspaceRepository.create (/app/node_modules/typeorm/repository/Repository.js:52:41)
at updateActivities (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:110:49)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async UpdateActivitiesCommand.executeWithQueryRunner (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:279:21)
at async UpdateActivitiesCommand.sharedBoilerplate (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:257:21)
at async UpgradeTo0_23Command.run (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-upgrade-version.command.js:43:9)
at async Command.<anonymous> (/app/node_modules/nest-commander/src/command-runner.service.js:156:24)
at async Command.parseAsync (/app/node_modules/commander/lib/command.js:936:5)
[Nest] 284 - 02/18/2025, 3:32:47 PM LOG [UpdateActivitiesCommand] Running command on workspace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx failed
[Nest] 284 - 02/18/2025, 3:32:47 PM ERROR [UpdateActivitiesCommand] Migration failed for workspace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: No metadata for "task" was found., EntityMetadataNotFoundError: No metadata for "task" was found.
at WorkspaceDataSource.getMetadata (/app/node_modules/typeorm/data-source/DataSource.js:304:19)
at get metadata [as metadata] (/app/node_modules/typeorm/repository/Repository.js:15:40)
at WorkspaceRepository.create (/app/node_modules/typeorm/repository/Repository.js:52:41)
at updateActivities (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:110:49)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async UpdateActivitiesCommand.executeWithQueryRunner (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:279:21)
at async UpdateActivitiesCommand.sharedBoilerplate (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-update-activities.command.js:257:21)
at async UpgradeTo0_23Command.run (/app/packages/twenty-server/dist/src/database/commands/upgrade-version/0-23/0-23-upgrade-version.command.js:43:9)
at async Command.<anonymous> (/app/node_modules/nest-commander/src/command-runner.service.js:156:24)
at async Command.parseAsync (/app/node_modules/commander/lib/command.js:936:5)
This seems to happen each time, and all notes are missing after the upgrade. If someone can help, this would be very usefull. Thanks !
3 Replies
thomast
thomast2mo ago
Hi, did you run yarn database:migrate:prod before running the upgrade?
Crosp
CrospOP2mo ago
Yes I did, the migration seems good. I can do it again from previous snapshot and post logs if you want Here is my upgrade process: - Change twenty version TAG in .env ( 0.22 -> 0.23 ) - docker compose down and docker compose up -d to reload containers with new twenty docker images version - docker compose exec -it server yarn database:migrate:prod - docker compose exec -it server yarn command:prod upgrade-0.23 Did I understand well ?
charles
charles2mo ago
Hi Crosp, 0.22 is quite old. It's possible that one of the script is buggy and this will be quite hard to troubleshoot would you be available for a call later this week?

Did you find this page helpful?