File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ fn create_migration_file(
71
71
let snake_case_name = migration_name
72
72
. replace ( |c : char | !c. is_alphanumeric ( ) , "_" )
73
73
. to_lowercase ( ) ;
74
- let file_name = format ! ( "{}_{}.sql" , timestamp , snake_case_name ) ;
74
+ let file_name = format ! ( "{timestamp }_{snake_case_name }.sql" ) ;
75
75
let migrations_dir = Path :: new ( configuration_directory) . join ( "migrations" ) ;
76
76
77
77
if !migrations_dir. exists ( ) {
@@ -82,7 +82,7 @@ fn create_migration_file(
82
82
let mut counter = 1 ;
83
83
84
84
while migrations_dir. join ( & unique_file_name) . exists ( ) {
85
- unique_file_name = format ! ( "{}_{}_{}.sql" , timestamp , snake_case_name , counter ) ;
85
+ unique_file_name = format ! ( "{timestamp }_{snake_case_name }_{counter }.sql" ) ;
86
86
counter += 1 ;
87
87
}
88
88
@@ -104,6 +104,6 @@ fn create_migration_file(
104
104
display_path_str = display_path_str. trim_start_matches ( "\\ \\ ?\\ " ) . to_string ( ) ;
105
105
}
106
106
display_path_str = display_path_str. replace ( '\\' , "/" ) ;
107
- println ! ( "Migration file created: {}" , display_path_str ) ;
107
+ println ! ( "Migration file created: {display_path_str}" ) ;
108
108
Ok ( ( ) )
109
109
}
You can’t perform that action at this time.
0 commit comments