File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,16 @@ def main(project_type):
71
71
72
72
# Check if the updates directory exists and process it
73
73
if os .path .isdir (updates_dir ):
74
- for root , _ , files in os .walk (updates_dir ):
75
- for file in sorted (files ):
76
- if file .endswith (".sql" ) and exclude_prefix not in file :
77
- file_path = os .path .join (root , file )
78
- execute_sql_file (conn , file_path )
74
+ for subdir in sorted (os .listdir (updates_dir )):
75
+ subdir_path = os .path .join (updates_dir , subdir )
76
+ # Check if the updates subdirectory exists and process it
77
+ if os .path .isdir (subdir_path ):
78
+ for root , dirs , files in os .walk (subdir_path ):
79
+ dirs [:] = [d for d in dirs if d in ['utils' , f"{ project_type } " ]]
80
+ for file in sorted (files ):
81
+ if file .endswith (".sql" ):
82
+ file_path = os .path .join (root , file )
83
+ execute_sql_file (conn , file_path )
79
84
else :
80
85
print (f"Directory { updates_dir } does not exist" )
81
86
You can’t perform that action at this time.
0 commit comments