Add enums module: enum mapping in Hibernate 7.4.17.Final (ORDINAL trap, STRING, PostgreSQL native enum, AttributeConverter, @EnumeratedValue), what release 2 reads and writes after a constant is inserted, appended or renamed, hbm2ddl=update limits, migrations (H2 2.4.240, PostgreSQL 18.6)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b5y3ArhRbakfu1ELsP
This commit is contained in:
Claude
2026-11-19 23:00:31 +05:30
parent 0db721805b
commit bd0f33a306
22 changed files with 1785 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Starts a throwaway PostgreSQL server for the tests, without Docker. Idempotent.
# PostgreSQL 18.6 : zonky embedded-postgres-binaries-linux-amd64 18.6.0 from Maven Central (initdb, pg_ctl, postgres), port 55432
# PostgreSQL refuses to run as root, so this creates a throwaway OS user (pgj). Run it as root in a disposable sandbox.
set -euo pipefail
BASE="${BASE:-/tmp/work/dbs}"
PGPORT="${PGPORT:-55432}"
mkdir -p "$BASE/pg"
id pgj >/dev/null 2>&1 || useradd -m pgj
if [ ! -x "$BASE/pg/pg/bin/postgres" ]; then
curl -sSfL -o "$BASE/pg/pg.jar" \
https://repo1.maven.org/maven2/io/zonky/test/postgres/embedded-postgres-binaries-linux-amd64/18.6.0/embedded-postgres-binaries-linux-amd64-18.6.0.jar
(cd "$BASE/pg" && unzip -o -q pg.jar && mkdir -p pg && tar -xJf postgres-linux-x86_64.txz -C pg)
fi
chmod -R a+rX "$BASE/pg"
if [ ! -f "$BASE/pg/data/PG_VERSION" ]; then
mkdir -p "$BASE/pg/data"; chown pgj "$BASE/pg/data"
su pgj -c "cd /tmp && $BASE/pg/pg/bin/initdb -D $BASE/pg/data -U postgres -A trust -E UTF8 >/dev/null"
fi
su pgj -c "$BASE/pg/pg/bin/pg_ctl -D $BASE/pg/data -o '-p $PGPORT -k /tmp' -l $BASE/pg/data/pg.log -w start" || true
psql -h 127.0.0.1 -p "$PGPORT" -U postgres -Atc 'select version()'