Fix hashing function

This commit is contained in:
Ajay Ramachandran
2021-04-02 12:03:21 -04:00
parent 93d7242021
commit cfbf8a47d7

View File

@@ -136,7 +136,7 @@ export class Postgres implements IDatabase {
private processUpgradeQuery(query: string): string {
let result = query;
result = result.replace(/sha256\((.*?)\)/gm, "digest($1, 'sha256')");
result = result.replace(/sha256\((.*?)\)/gm, "encode(digest($1, 'sha256'), 'hex')");
result = result.replace(/integer/gmi, "NUMERIC");
return result;