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(
7171 let snake_case_name = migration_name
7272 . replace ( |c : char | !c. is_alphanumeric ( ) , "_" )
7373 . to_lowercase ( ) ;
74- let file_name = format ! ( "{}_{}.sql" , timestamp , snake_case_name ) ;
74+ let file_name = format ! ( "{timestamp }_{snake_case_name }.sql" ) ;
7575 let migrations_dir = Path :: new ( configuration_directory) . join ( "migrations" ) ;
7676
7777 if !migrations_dir. exists ( ) {
@@ -82,7 +82,7 @@ fn create_migration_file(
8282 let mut counter = 1 ;
8383
8484 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" ) ;
8686 counter += 1 ;
8787 }
8888
@@ -104,6 +104,6 @@ fn create_migration_file(
104104 display_path_str = display_path_str. trim_start_matches ( "\\ \\ ?\\ " ) . to_string ( ) ;
105105 }
106106 display_path_str = display_path_str. replace ( '\\' , "/" ) ;
107- println ! ( "Migration file created: {}" , display_path_str ) ;
107+ println ! ( "Migration file created: {display_path_str}" ) ;
108108 Ok ( ( ) )
109109}
You can’t perform that action at this time.
0 commit comments