mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-25 04:25:13 +03:00
Qfix: Extend patch version values range in PG (#7005)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
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][] {
|
||||
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;
|
||||
`
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user