discourse/migrations/lib/database/intermediate_db
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
..
enums DEV: Handle running TemporaryDb as root (#38988) 2026-03-31 20:17:50 +02:00
badge.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
badge_grouping.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
category.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
category_custom_field.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
category_moderation_group.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
category_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
group.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
group_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
log_entry.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
muted_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
permalink_normalization.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
site_setting.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag_group.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag_group_membership.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag_group_permission.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag_synonym.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
tag_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
topic.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
topic_allowed_group.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
topic_allowed_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
topic_tag.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
topic_user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
upload.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_associated_account.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_custom_field.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_email.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_field.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_field_option.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_field_value.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_option.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00
user_suspension.rb MT: Switch to nested module style across migrations/ (#38564) 2026-03-19 18:15:19 +01:00