T
Twenty6mo ago
deurk

Column does not exist

Hello, when trying to connect to Google Calendar, after the auth on Google side I am redirected to Twenty that throws a 500 error. Log says
db-1 | 2024-06-08 08:17:12.950 GMT [213] ERROR: column "syncStageStartedAt" of relation "messageChannel" does not exist at character 104
db-1 | 2024-06-08 08:17:12.950 GMT [213] STATEMENT: UPDATE workspace_[ID]."messageChannel" SET "syncStatus" = NULL, "syncCursor" = '', "syncStageStartedAt" = NULL
db-1 | WHERE "connectedAccountId" = $1
db-1 | 2024-06-08 08:17:12.950 GMT [213] ERROR: column "syncStageStartedAt" of relation "messageChannel" does not exist at character 104
db-1 | 2024-06-08 08:17:12.950 GMT [213] STATEMENT: UPDATE workspace_[ID]."messageChannel" SET "syncStatus" = NULL, "syncCursor" = '', "syncStageStartedAt" = NULL
db-1 | WHERE "connectedAccountId" = $1
Is there some migration command I have to run as I've installed Twenty a few versions back and upgraded my containers as you released them? (Note: I do not wish to reset the database and start from scratch as I finally managed to finish importing all my Google Mail into Twenty) Thanks!
9 Replies
deurk
deurkOP6mo ago
The redirected URL in error 500 is
https://[TWENTY_URL]/auth/google-apis/get-access-token?state=[XXX]&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/gmail.readonly%20https://www.googleapis.com/auth/calendar.events%20openid&authuser=0&hd=[XXX]&prompt=consent
https://[TWENTY_URL]/auth/google-apis/get-access-token?state=[XXX]&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/gmail.readonly%20https://www.googleapis.com/auth/calendar.events%20openid&authuser=0&hd=[XXX]&prompt=consent
charles
charles6mo ago
Hi @deurk, sorry for the slow answer. What version of twenty are you running?
deurk
deurkOP6mo ago
Hey @charles v0.12.2
charles
charles6mo ago
ok, could you run: - yarn command:prod workspace:health -w {your workspaceId} -d and then check your logs folder on twenty-server
deurk
deurkOP6mo ago
deurk
deurkOP6mo ago
db-1 | 2024-06-12 15:08:34.346 GMT [287833] ERROR: column "syncStageStartedAt" of relation "messageChannel" does not exist at character 104
db-1 | 2024-06-12 15:08:34.346 GMT [287833] STATEMENT: UPDATE workspace_rmln9ha4bllxt21h7iww53x2."messageChannel" SET "syncStatus" = NULL, "syncCursor" = '', "syncStageStartedAt" = NULL
db-1 | WHERE "connectedAccountId" = $1
db-1 | 2024-06-12 15:08:34.346 GMT [287833] ERROR: column "syncStageStartedAt" of relation "messageChannel" does not exist at character 104
db-1 | 2024-06-12 15:08:34.346 GMT [287833] STATEMENT: UPDATE workspace_rmln9ha4bllxt21h7iww53x2."messageChannel" SET "syncStatus" = NULL, "syncCursor" = '', "syncStageStartedAt" = NULL
db-1 | WHERE "connectedAccountId" = $1
charles
charles6mo ago
okay, looks that you just have to upgrade your workspace data model: yarn command:prod workspace:sync-metadata -w {your workspaceId} -df
deurk
deurkOP6mo ago
[Nest] 235908 - 06/12/2024, 11:00:08 PM WARN [SyncWorkspaceMetadataCommand] Workspace contains 2 issues, sync has been forced.
[Nest] 235908 - 06/12/2024, 11:00:08 PM WARN [SyncWorkspaceMetadataCommand] Workspace contains 2 issues, sync has been forced.
lovely, thanks @charles !
worker-1 | [Nest] 186 - 06/12/2024, 11:06:52 PM LOG [GoogleCalendarSyncJob] google calendar sync for workspace xxx and account yyy
worker-1 | [Nest] 186 - 06/12/2024, 11:06:52 PM LOG [GoogleCalendarSyncJob] google calendar sync for workspace xxx and account yyy
charles
charles6mo ago
great!
Want results from more Discord servers?
Add your server