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 5280460 commit e2a7b85Copy full SHA for e2a7b85
bootcamp/materials/1-dimensional-data-modeling/scripts/init-db.sh
@@ -1,13 +1,14 @@
1
#!/bin/bash
2
set -e
3
4
-# Import the data dump
5
-psql \
6
- -v ON_ERROR_STOP=1 \
7
- --username $POSTGRES_USER \
8
- --dbname $POSTGRES_DB \
9
- < /docker-entrypoint-initdb.d/data.dump
10
-
+# Restore the dump file using pg_restore
+pg_restore \
+ -v \
+ --no-owner \
+ --no-privileges \
+ -U $POSTGRES_USER \
+ -d $POSTGRES_DB \
11
+ /docker-entrypoint-initdb.d/data.dump
12
13
# Check if the path is a directory using the -d flag and
14
# there are SQL files in the directory using the -f command
0 commit comments