@@ -165,7 +165,7 @@ describe_only_db('postgres')('PostgresStorageAdapter', () => {
165
165
] ) ;
166
166
//Postgres won't take advantage of the index until it has a lot of records because sequential is faster for small db's
167
167
await client . none (
168
- 'INSERT INTO $1:name ($2:name, $3:name) SELECT MD5(random()::text), MD5(random()::text ) FROM generate_series(1,5000)' ,
168
+ 'INSERT INTO $1:name ($2:name, $3:name) SELECT gen_random_uuid(), gen_random_uuid( ) FROM generate_series(1,5000)' ,
169
169
[ tableName , 'objectId' , 'username' ]
170
170
) ;
171
171
const caseInsensitiveData = 'bugs' ;
@@ -245,7 +245,7 @@ describe_only_db('postgres')('PostgresStorageAdapter', () => {
245
245
//Postgres won't take advantage of the index until it has a lot of records because sequential is faster for small db's
246
246
const client = adapter . _client ;
247
247
await client . none (
248
- 'INSERT INTO $1:name ($2:name, $3:name) SELECT MD5(random()::text), MD5(random()::text ) FROM generate_series(1,5000)' ,
248
+ 'INSERT INTO $1:name ($2:name, $3:name) SELECT gen_random_uuid(), gen_random_uuid( ) FROM generate_series(1,5000)' ,
249
249
[ tableName , 'objectId' , 'username' ]
250
250
) ;
251
251
const caseInsensitiveData = 'bugs' ;
@@ -303,7 +303,7 @@ describe_only_db('postgres')('PostgresStorageAdapter', () => {
303
303
//Postgres won't take advantage of the index until it has a lot of records because sequential is faster for small db's
304
304
const client = adapter . _client ;
305
305
await client . none (
306
- 'INSERT INTO $1:name ($2:name, $3:name) SELECT MD5(random()::text), MD5(random()::text ) FROM generate_series(1,5000)' ,
306
+ 'INSERT INTO $1:name ($2:name, $3:name) SELECT gen_random_uuid(), gen_random_uuid( ) FROM generate_series(1,5000)' ,
307
307
[ tableName , 'objectId' , 'username' ]
308
308
) ;
309
309
@@ -345,11 +345,11 @@ describe_only_db('postgres')('PostgresStorageAdapter', () => {
345
345
//Postgres won't take advantage of the index until it has a lot of records because sequential is faster for small db's
346
346
const client = adapter . _client ;
347
347
await client . none (
348
- 'INSERT INTO $1:name ($2:name, $3:name) SELECT MD5(random()::text), MD5(random()::text ) FROM generate_series(1,5000)' ,
348
+ 'INSERT INTO $1:name ($2:name, $3:name) SELECT gen_random_uuid(), gen_random_uuid( ) FROM generate_series(1,5000)' ,
349
349
[ firstTableName , 'objectId' , uniqueField ]
350
350
) ;
351
351
await client . none (
352
- 'INSERT INTO $1:name ($2:name, $3:name) SELECT MD5(random()::text), MD5(random()::text ) FROM generate_series(1,5000)' ,
352
+ 'INSERT INTO $1:name ($2:name, $3:name) SELECT gen_random_uuid(), gen_random_uuid( ) FROM generate_series(1,5000)' ,
353
353
[ secondTableName , 'objectId' , uniqueField ]
354
354
) ;
355
355
0 commit comments