We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caeaa78 commit 628d188Copy full SHA for 628d188
scripts/init_db.sh
@@ -2,6 +2,20 @@
2
set -x
3
set -eo pipefail
4
5
+# Check that both psql and sqlx-cli are installed
6
+if ! [ -x "$(command -v psql)" ]; then
7
+ echo "Error: psql is not installed."
8
+ exit 1
9
+fi
10
+
11
+if ! [ -x "$(command -v sqlx)" ]; then
12
+ echo "Error: sqlx is not installed."
13
+ echo >&2 "Use:"
14
+ echo >&2 " cargo install --version=\"0.8.0\" sqlx-cli --no-default-features --features rustls,postgres"
15
+ echo >&2 " to install it."
16
17
18
19
# Check if a custom user has been set, otherwise default to 'postgres'
20
DB_USER=${POSTGRES_USER:=postgres}
21
# Check if a custom password has been set, otherwise default to 'password'
0 commit comments