diff --git a/server/account/src/collections/postgres.ts b/server/account/src/collections/postgres.ts
index 09993fc848..906f4913d1 100644
--- a/server/account/src/collections/postgres.ts
+++ b/server/account/src/collections/postgres.ts
@@ -531,7 +531,7 @@ export class PostgresAccountDB implements AccountDB {
   }
 
   protected getMigrations (): [string, string][] {
-    return [this.getV1Migration()]
+    return [this.getV1Migration(), this.getV2Migration()]
   }
 
   // NOTE: NEVER MODIFY EXISTING MIGRATIONS. IF YOU NEED TO ADJUST THE SCHEMA, ADD A NEW MIGRATION.
@@ -627,4 +627,15 @@ export class PostgresAccountDB implements AccountDB {
     `
     ]
   }
+
+  private getV2Migration (): [string, string] {
+    return [
+      'account_db_v2_fix_workspace',
+      `
+
+      /* ======= WORKSPACE ======= */
+      ALTER TABLE workspace ALTER COLUMN "versionPatch" type INT4;
+    `
+    ]
+  }
 }
diff --git a/server/client/src/account.ts b/server/client/src/account.ts
index b73dfe448a..9daf7c7c36 100644
--- a/server/client/src/account.ts
+++ b/server/client/src/account.ts
@@ -138,7 +138,15 @@ export function withRetryConnUntilTimeout<P extends any[], T> (
 export function withRetryConnUntilSuccess<P extends any[], T> (
   f: (...params: P) => Promise<T>
 ): (...params: P) => Promise<T> {
-  const shouldFail = (err: any): boolean => err?.cause?.code !== 'ECONNRESET' && err?.cause?.code !== 'ECONNREFUSED'
+  const shouldFail = (err: any): boolean => {
+    const res = err?.cause?.code !== 'ECONNRESET' && err?.cause?.code !== 'ECONNREFUSED'
+
+    if (res) {
+      console.error('Failing withRetryConnUntilSuccess with error cause:', err?.cause)
+    }
+
+    return res
+  }
 
   return withRetry(f, shouldFail)
 }