mirror of
https://github.com/LemmyNet/lemmy.git
synced 2026-01-27 16:49:43 -06:00
* move schema_setup to separate crate * remove lemmy_utils dependency * add db_schema_setup/src/main.rs * fix diesel.toml * run diesel print-schema * fix replaceable_schema paths * remove unneeded dependencies * taplo format * fix duplicated cfg(test) attribute * move replaceable_schema to crates/db_schema_setup/replaceable_schema * warn if lemmy_db_schema_setup can be used instead of lemmy_server
17 lines
415 B
Bash
Executable File
17 lines
415 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_db_schema_setup
|
|
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
|