Skip to content

Commit 02860b5

Browse files
Merge #987
987: Ensure the build script is run when migrations are added r=carols10cents When the timestamp on the migrations/ directory changes the build script will be run so that any pending migrations are run. I've tested this on Linux, but management of timestamps on directories may be platform specific.
2 parents 1ebf509 + 2de08d3 commit 02860b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::env;
1010
fn main() {
1111
println!("cargo:rerun-if-env-changed=TEST_DATABASE_URL");
1212
println!("cargo:rerun-if-changed=build.rs");
13+
println!("cargo:rerun-if-changed=migrations/");
1314
if env::var("PROFILE") == Ok("debug".into()) {
1415
let _ = dotenv();
1516
if let Ok(database_url) = env::var("TEST_DATABASE_URL") {

0 commit comments

Comments
 (0)