mirror of
https://github.com/LemmyNet/lemmy.git
synced 2026-01-12 09:00:23 -06:00
* Upgrade to latest stable Rust (fixes #6006) * rust 1.91 * clippy * update deps * format * test fixes * upgrade debian for api tests * remove once_cell * Rename schema_setup to diesel_utils * move dburl * move db connection code * move utils * move sensitive string * move crud trait * clippy * shear * update paths * remove protobuf dep * feature fixes * features * fmt
21 lines
551 B
Bash
Executable File
21 lines
551 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# This check is only used for CI.
|
|
|
|
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
|
|
cd "$CWD/../"
|
|
|
|
# Copy the files to a temp dir
|
|
TMP_DIR=$(mktemp -d)
|
|
cp -a migrations/. $TMP_DIR/migrations
|
|
cp -a crates/diesel_utils/replaceable_schema/. $TMP_DIR/replaceable_schema
|
|
|
|
# Format the new files
|
|
find $TMP_DIR -type f -name '*.sql' -print0 | xargs -0 -P 10 -L 10 pg_format -i
|
|
|
|
# Diff the directories
|
|
diff -r migrations $TMP_DIR/migrations
|
|
diff -r crates/diesel_utils/replaceable_schema $TMP_DIR/replaceable_schema
|