discourse/migrations/lib
Jarek Radosz 0092d481f3
DEV: Handle running TemporaryDb as root (#38988)
PostgreSQL refuses to run initdb/pg_ctl as root. When TemporaryDb
detects it is running as root, it now delegates all PG commands to
the postgres system user via sudo. This fixes the migration-tests
CI workflow where the schema validation step runs as root.

Also adds a PATH-based fallback for pg_bin_path discovery to support
distributions that install PG binaries outside the hardcoded paths
(e.g. Fedora system packages in /usr/bin).

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2026-03-31 20:17:50 +02:00
..
cli MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
common MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
converters MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
database DEV: Handle running TemporaryDb as root (#38988) 2026-03-31 20:17:50 +02:00
importer MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
uploader DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
converters.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
database.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
importer.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
settings_parser.rb DEV: Refactor uploads_importer script (#29292) 2024-10-31 13:31:12 +00:00