Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Nov 24, 2024
1 parent c27eeb9 commit 6283569
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prepare-database-postgresql.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# set -ex
set -ex

# read variables from environment
db_host=${POSTGRES_HOST:-}
Expand All @@ -27,7 +27,7 @@ fi

# reset database
echo "️😈 Reset database $db_name in local"
dropdb $db_name
dropdb $param $db_name
# http://www.postgres.cn/docs/15/app-createdb.html
createdb $param --echo --encoding=UTF8 $db_name

Expand All @@ -43,5 +43,5 @@ for file in $sql_files; do
done

echo "🎉 prepare database $db_name done"
# psql --dbname=$db_name -c "SELECT * FROM pg_catalog.pg_tables where schemaname = 'public';"
psql --dbname=$db_name -c "\dt"
# psql $param --dbname=$db_name -c "SELECT * FROM pg_catalog.pg_tables where schemaname = 'public';"
psql $param --dbname=$db_name -c "\dt"

0 comments on commit 6283569

Please sign in to comment.