mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 04:49:00 +00:00
Qfix: Extend patch version values range in PG (#7005)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
f06a6e2bc8
commit
8edf748d30
@ -531,7 +531,7 @@ export class PostgresAccountDB implements AccountDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected getMigrations (): [string, string][] {
|
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.
|
// 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;
|
||||||
|
`
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,15 @@ export function withRetryConnUntilTimeout<P extends any[], T> (
|
|||||||
export function withRetryConnUntilSuccess<P extends any[], T> (
|
export function withRetryConnUntilSuccess<P extends any[], T> (
|
||||||
f: (...params: P) => Promise<T>
|
f: (...params: P) => Promise<T>
|
||||||
): (...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)
|
return withRetry(f, shouldFail)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user