File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ fn file_stem_re() -> &'static Regex {
2323/// Matches the stem + extension of a SQL migration file.
2424fn file_re_sql ( ) -> & ' static Regex {
2525 static RE : OnceLock < Regex > = OnceLock :: new ( ) ;
26- RE . get_or_init ( || Regex :: new ( [ STEM_RE , r"\.sql$" ] . concat ( ) . as_str ( ) ) . unwrap ( ) )
26+ RE . get_or_init ( || Regex :: new ( [ STEM_RE , r"\.( sql|surql) $" ] . concat ( ) . as_str ( ) ) . unwrap ( ) )
2727}
2828
2929/// Matches the stem + extension of any migration file.
3030fn file_re_all ( ) -> & ' static Regex {
3131 static RE : OnceLock < Regex > = OnceLock :: new ( ) ;
32- RE . get_or_init ( || Regex :: new ( [ STEM_RE , r"\.(rs|sql)$" ] . concat ( ) . as_str ( ) ) . unwrap ( ) )
32+ RE . get_or_init ( || Regex :: new ( [ STEM_RE , r"\.(rs|sql|surql )$" ] . concat ( ) . as_str ( ) ) . unwrap ( ) )
3333}
3434
3535/// enum containing the migration types used to search for migrations
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ pub fn embed_migrations(input: TokenStream) -> TokenStream {
120120 let extension = migration. extension ( ) . unwrap ( ) ;
121121 migration_filenames. push ( filename. clone ( ) ) ;
122122
123- if extension == "sql" {
123+ if extension == "sql" || extension == "surql" {
124124 _migrations. push ( quote ! { ( #filename, include_str!( #path) . to_string( ) ) } ) ;
125125 } else if extension == "rs" {
126126 let rs_content = fs:: read_to_string ( & path)
You can’t perform that action at this time.
0 commit comments