@@ -293,7 +293,7 @@ def main():
293
293
# ---------------------------------------------------------
294
294
fname = dir_sql + '4__schema_create.sql'
295
295
print ('Calling ' + fname + ' ...' )
296
- ret = mapping_util .execute_sql_file_parallel (db_conf , fname , False )
296
+ ret = mapping_util .execute_sql_file_parallel (db_conf , fname , False , False )
297
297
if ret == True :
298
298
# ---------------------------------------------------------
299
299
# Drop vocabularies tables - Parallel execution of queries in the file - Ask the user for DROP confirmation
@@ -342,19 +342,25 @@ def main():
342
342
if ret == True :
343
343
print ('Finished loading cdm vocabulary.' )
344
344
# ---------------------------------------------------------
345
- # Create vocabularies PK, indexes, FKs - Parallel execution
345
+ # Build PK, indexes - Parallel execution
346
346
# ---------------------------------------------------------
347
347
if ret == True :
348
- qa = input ('Are you sure you want to CREATE PK/IDXs/FKs for all the vocabulary tables (y/n):' )
348
+ qa = input ('Are you sure you want to CREATE PK/IDXs for all the vocabulary tables (y/n):' )
349
349
while qa .lower () not in ['y' , 'n' , 'yes' , 'no' ]:
350
350
qa = input ('I did not understand that. Are you sure you want to CREATE PK/IDXs for all the vocabulary tables (y/n):' )
351
351
if qa .lower () in ['y' , 'yes' ]:
352
- print ('Build PKs, IDXs and FKs ...' )
352
+ print ('Build PKs and IDXs ...' )
353
353
sql_file_list = sorted (glob .iglob (dir_sql + '3c_cdm_pk_idx_*.sql' ))
354
354
ret = mapping_util .execute_sql_files_parallel (db_conf , sql_file_list , True )
355
355
# ---------------------------------------------------------
356
- # Build FKs
356
+ # Build FKs - Parallel execution
357
357
# ---------------------------------------------------------
358
+ if ret == True :
359
+ qa = input ('Are you sure you want to CREATE FKs for all the vocabulary tables (y/n):' )
360
+ while qa .lower () not in ['y' , 'n' , 'yes' , 'no' ]:
361
+ qa = input ('I did not understand that. Are you sure you want to CREATE FKs for all the vocabulary tables (y/n):' )
362
+ if qa .lower () in ['y' , 'yes' ]:
363
+ print ('Build FKs ...' )
358
364
if ret == True :
359
365
fname = dir_sql + '3d_cdm_fk_voc.sql'
360
366
ret = mapping_util .execute_multiple_queries (db_conf , fname , None , None , True , True )
0 commit comments