File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1- use crate :: database:: ReadOnlyPgPool ;
21use crate :: database:: redis:: RedisPool ;
2+ use crate :: database:: { MIGRATOR , ReadOnlyPgPool } ;
33use crate :: search;
44use sqlx:: { PgPool , postgres:: PgPoolOptions } ;
55use std:: time:: Duration ;
@@ -82,8 +82,7 @@ impl TemporaryDatabase {
8282 println ! ( "Running migrations on temporary database" ) ;
8383
8484 // Performs migrations
85- let migrations = sqlx:: migrate!( "./migrations" ) ;
86- migrations. run ( & pool) . await . expect ( "Migrations failed" ) ;
85+ MIGRATOR . run ( & pool) . await . expect ( "Migrations failed" ) ;
8786
8887 println ! ( "Migrations complete" ) ;
8988
@@ -182,8 +181,7 @@ impl TemporaryDatabase {
182181 }
183182
184183 // Run migrations on the template
185- let migrations = sqlx:: migrate!( "./migrations" ) ;
186- migrations. run ( & pool) . await . expect ( "Migrations failed" ) ;
184+ MIGRATOR . run ( & pool) . await . expect ( "Migrations failed" ) ;
187185
188186 if !dummy_data_exists {
189187 // Add dummy data
You can’t perform that action at this time.
0 commit comments