mirror of
https://github.com/LemmyNet/lemmy.git
synced 2026-04-26 10:29:43 -05:00
17 lines
429 B
Bash
Executable File
17 lines
429 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Dumps database schema, not including things that are added outside of migrations
|
|
|
|
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
|
|
cd "$CWD/../"
|
|
|
|
source scripts/start_dev_db.sh
|
|
|
|
cargo run --package lemmy_server -- migration --all run
|
|
pg_dump --no-owner --no-privileges --no-table-access-method --schema-only --exclude-schema=r --no-sync -f schema.sqldump
|
|
|
|
pg_ctl stop
|
|
rm -rf $PGDATA
|