From 37e59f1494e3953e94343d313b2b7028eed01ea1 Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Wed, 17 Jun 2020 12:50:56 -0700 Subject: [PATCH] doc(readme): note requirement of `offline` feature for `cargo sqlx prepare` --- sqlx-cli/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sqlx-cli/README.md b/sqlx-cli/README.md index adb75d08..9c16656e 100644 --- a/sqlx-cli/README.md +++ b/sqlx-cli/README.md @@ -62,6 +62,14 @@ cargo sqlx prepare Saves query data to `sqlx-data.json` in the current directory; check this file into version control and an active database connection will no longer be needed to build your project. +Has no effect unless the `offline` feature of `sqlx` is enabled in your project. Omitting that feature is the most likely cause if you get a `sqlx-data.json` file that looks like this: + +```json +{ + "database": "PostgreSQL" +} +``` + ---- ```bash cargo sqlx prepare --check