@@ -10,7 +10,6 @@ import cars_MyS_resource from './resources/cars_MyS.js';
1010import cars_PG_resource from './resources/cars_PG.js' ;
1111import cars_Mongo_resource from './resources/cars_mongo.js' ;
1212import cars_Ch_resource from './resources/cars_Ch.js' ;
13-
1413import auditLogsResource from "./resources/auditLogs.js"
1514import { FICTIONAL_CAR_BRANDS , FICTIONAL_CAR_MODELS_BY_BRAND , ENGINE_TYPES , BODY_TYPES } from './custom/cars_data.js' ;
1615import passkeysResource from './resources/passkeys.js' ;
@@ -200,7 +199,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
200199 for ( let i = 0 ; i < 100 ; i ++ ) {
201200 const engine_type = ENGINE_TYPES [ Math . floor ( Math . random ( ) * ENGINE_TYPES . length ) ] . value ;
202201 await admin . resource ( 'cars_sl' ) . create ( {
203- id : ` ${ i } ` ,
202+ id : crypto . randomUUID ( ) ,
204203 model : `${ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] } ${ FICTIONAL_CAR_MODELS_BY_BRAND [ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] ] [ Math . floor ( Math . random ( ) * 4 ) ] } ` ,
205204 price : Decimal ( Math . random ( ) * 10000 ) . toFixed ( 2 ) ,
206205 engine_type : engine_type ,
@@ -216,7 +215,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
216215 for ( let i = 0 ; i < 100 ; i ++ ) {
217216 const engine_type = ENGINE_TYPES [ Math . floor ( Math . random ( ) * ENGINE_TYPES . length ) ] . value ;
218217 await admin . resource ( 'cars_mongo' ) . create ( {
219- _id : ` ${ i } ` ,
218+ _id : crypto . randomUUID ( ) ,
220219 model : `${ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] } ${ FICTIONAL_CAR_MODELS_BY_BRAND [ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] ] [ Math . floor ( Math . random ( ) * 4 ) ] } ` ,
221220 price : Decimal ( Math . random ( ) * 10000 ) . toFixed ( 2 ) ,
222221 engine_type : engine_type ,
@@ -233,7 +232,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
233232 for ( let i = 0 ; i < 100 ; i ++ ) {
234233 const engine_type = ENGINE_TYPES [ Math . floor ( Math . random ( ) * ENGINE_TYPES . length ) ] . value ;
235234 await admin . resource ( 'cars_mysql' ) . create ( {
236- id : ` ${ i } ` ,
235+ id : crypto . randomUUID ( ) ,
237236 model : `${ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] } ${ FICTIONAL_CAR_MODELS_BY_BRAND [ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] ] [ Math . floor ( Math . random ( ) * 4 ) ] } ` ,
238237 price : Decimal ( Math . random ( ) * 10000 ) . toFixed ( 2 ) ,
239238 engine_type : engine_type ,
@@ -250,7 +249,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
250249 for ( let i = 0 ; i < 100 ; i ++ ) {
251250 const engine_type = ENGINE_TYPES [ Math . floor ( Math . random ( ) * ENGINE_TYPES . length ) ] . value ;
252251 await admin . resource ( 'cars_pg' ) . create ( {
253- id : ` ${ i } ` ,
252+ id : crypto . randomUUID ( ) ,
254253 model : `${ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] } ${ FICTIONAL_CAR_MODELS_BY_BRAND [ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] ] [ Math . floor ( Math . random ( ) * 4 ) ] } ` ,
255254 price : Decimal ( Math . random ( ) * 10000 ) . toFixed ( 2 ) ,
256255 engine_type : engine_type ,
@@ -267,7 +266,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
267266 for ( let i = 0 ; i < 100 ; i ++ ) {
268267 const engine_type = ENGINE_TYPES [ Math . floor ( Math . random ( ) * ENGINE_TYPES . length ) ] . value ;
269268 await admin . resource ( 'cars_ch' ) . create ( {
270- id : ` ${ i } ` ,
269+ id : crypto . randomUUID ( ) ,
271270 model : `${ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] } ${ FICTIONAL_CAR_MODELS_BY_BRAND [ FICTIONAL_CAR_BRANDS [ Math . floor ( Math . random ( ) * FICTIONAL_CAR_BRANDS . length ) ] ] [ Math . floor ( Math . random ( ) * 4 ) ] } ` ,
272271 price : Decimal ( Math . random ( ) * 10000 ) . toFixed ( 2 ) ,
273272 engine_type : engine_type ,
0 commit comments