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.
2 parents 692fbf8 + e2a7b85 commit e75a75fCopy full SHA for e75a75f
bootcamp/materials/1-dimensional-data-modeling/docker-compose.yml
@@ -1,4 +1,3 @@
1
-version: "3.10.6"
2
services:
3
postgres:
4
image: postgres:14
bootcamp/materials/1-dimensional-data-modeling/scripts/init-db.sh
@@ -1,13 +1,14 @@
#!/bin/bash
set -e
-# 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