mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 13:51:19 +00:00
Create dump_schema.sh
This commit is contained in:
parent
9306e31785
commit
bd67514937
1 changed files with 16 additions and 0 deletions
16
scripts/dump_schema.sh
Normal file
16
scripts/dump_schema.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Dumps database schema, not including things added by replaceable_schema.sql
|
||||
|
||||
source CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
|
||||
cd $CWD/../
|
||||
|
||||
source scripts/start_dev_db.sh
|
||||
|
||||
diesel migration run
|
||||
pg_dump --no-owner --no-privileges --no-table-access-method --schema-only --no-sync -f schema.sqldump
|
||||
|
||||
pg_ctl stop
|
||||
rm -rf $PGDATA
|
Loading…
Reference in a new issue