Private
Public Access
1
0
Files
linux_patch_manager/debian
Draco-Lunaris-Echo 60388c9614 fix: reassign DB object ownership to patch_manager after migrations
The postinst script runs migrations as the postgres superuser, which
means all created tables, enum types, and sequences are owned by
postgres. When pm-web connects as patch_manager and tries to ALTER
tables during upgrades, it fails with 'must be owner of table groups'.

Add reassign_ownership() function that runs after apply_migrations()
and before systemctl start. This function:
- REASSIGN OWNED BY postgres TO patch_manager (tables, types, sequences)
- ALTER SCHEMA public OWNER TO patch_manager
- GRANT ALL PRIVILEGES on database, schema, tables, sequences, functions
- ALTER DEFAULT PRIVILEGES for future objects in public schema

Renumbered sections 6-10 to 6-12 to accommodate the new function.
2026-06-09 13:51:07 -05:00
..
2026-06-09 13:15:05 -05:00
2026-06-09 13:15:05 -05:00