aboutsummaryrefslogtreecommitdiffstats
path: root/extra/sql_dumps
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-13 14:50:32 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-13 14:50:32 -0700
commit571f166f11b019855c80df1fc4146acc367599aa (patch)
tree86232ce0f1bdddbd39a6b356ce3eb19711087ec2 /extra/sql_dumps
parent4c382537e8c835d1033fc9496a9037faf4ae7f40 (diff)
downloadfatcat-571f166f11b019855c80df1fc4146acc367599aa.tar.gz
fatcat-571f166f11b019855c80df1fc4146acc367599aa.zip
DATABASE_URL, not DATABASE_URI
Diffstat (limited to 'extra/sql_dumps')
-rwxr-xr-xextra/sql_dumps/ident_table_snapshot.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/extra/sql_dumps/ident_table_snapshot.sh b/extra/sql_dumps/ident_table_snapshot.sh
index 1d45a900..66144fd3 100755
--- a/extra/sql_dumps/ident_table_snapshot.sh
+++ b/extra/sql_dumps/ident_table_snapshot.sh
@@ -1,13 +1,13 @@
#!/bin/bash
-DATABASE_URI="${DATABASE_URI:-fatcat}"
+DATABASE_URL="${DATABASE_URL:-fatcat}"
OUTPUT_DIR="${1:-.}"
set -e -u -o pipefail
# This script needs to be run from the directory with the 'dump_idents.sql'
# script in it.
-# The DATABASE_URI env variable is optional, defaults to 'fatcat' (meaning,
+# The DATABASE_URL env variable is optional, defaults to 'fatcat' (meaning,
# local postgres, database named 'fatcat')
# An optional argument is a path to a directory to save output.
@@ -15,8 +15,8 @@ set -e -u -o pipefail
DATESLUG="`date +%Y-%m-%d.%H%M%S`"
echo "Will move output to '${OUTPUT_DIR}'"
-echo "Running SQL (from '${DATABASE_URI}')..."
-psql $DATABASE_URI < ./dump_idents.sql
+echo "Running SQL (from '${DATABASE_URL}')..."
+psql $DATABASE_URL < ./dump_idents.sql
CHANGELOG_REV="`head -n1 /tmp/fatcat_ident_latest_changelog.tsv`"
OUTFILE="${OUTPUT_DIR}/fatcat_idents.$DATESLUG.r$CHANGELOG_REV.tar.gz"