srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/server/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/build.rs')
-rw-r--r--crates/server/build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/server/build.rs b/crates/server/build.rs
new file mode 100644
index 0000000..35756ee
--- /dev/null
+++ b/crates/server/build.rs
@@ -0,0 +1,7 @@
+// sqlx::migrate! reads the migrations directory at compile time, but cargo
+// only watches source files. Without this, adding a migration does not make
+// cargo rebuild, so the new binary silently ships the old migration set and
+// the schema change never runs.
+fn main() {
+ println!("cargo:rerun-if-changed=migrations");
+}