Refactor all references to computer to Superbrain
release gate / check (push) Failing after 6m55s

This commit is contained in:
Andrew S Erwin
2026-10-22 00:33:44 -05:00
parent 45aa3c80aa
commit d870eece1e
84 changed files with 438 additions and 381 deletions
+12 -8
View File
@@ -13,16 +13,20 @@
set -eu
DB_HOST="${DB_HOST:-db}"
DB_USER="${DB_USER:-computer}"
[ -n "${PGPASSWORD:-}" ] || { echo "error: PGPASSWORD is required" >&2; exit 1; }
DB_USER="${DB_USER:-superbrain}"
[ -n "${PGPASSWORD:-}" ] || {
echo "error: PGPASSWORD is required" >&2
exit 1
}
BASE_DB=computer_conv_schema
CHAIN_DB=computer_conv_chain
BASE_DB=superbrain_conv_schema
CHAIN_DB=superbrain_conv_chain
psql() { command psql -h "$DB_HOST" -U "$DB_USER" -v ON_ERROR_STOP=1 "$@"; }
drop() { psql -q -d postgres -c "DROP DATABASE IF EXISTS $1 WITH (FORCE)" >/dev/null 2>&1 || true; }
drop "$BASE_DB"; drop "$CHAIN_DB"
drop "$BASE_DB"
drop "$CHAIN_DB"
trap 'drop "$BASE_DB"; drop "$CHAIN_DB"' EXIT INT TERM
psql -q -d postgres -c "CREATE DATABASE $BASE_DB"
@@ -54,8 +58,8 @@ catalog() {
ORDER BY 1"
}
catalog "$BASE_DB" > /tmp/base.catalog
catalog "$CHAIN_DB" > /tmp/chain.catalog
catalog "$BASE_DB" >/tmp/base.catalog
catalog "$CHAIN_DB" >/tmp/chain.catalog
fail() {
echo "error: db/schema.sql and db/migrations disagree (diff above)." >&2
@@ -80,7 +84,7 @@ if [ -n "$tables" ]; then
done
psql -q -d "$CHAIN_DB" -c "DELETE FROM _migration"
DB_NAME="$CHAIN_DB" sh /db/migrate.sh >/dev/null
catalog "$CHAIN_DB" > /tmp/chain.catalog
catalog "$CHAIN_DB" >/tmp/chain.catalog
diff -u /tmp/base.catalog /tmp/chain.catalog || fail
fi