27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# scripts
|
|
dir: scripts
|
|
|
|
index: scripts/.pi-map.index.md
|
|
|
|
## role
|
|
Provides operational utilities for database maintenance and security management in containerized deployments.
|
|
## files
|
|
- fix_ghost_migration.sh | Diagnoses a ghost Alembic migration issue by checking for orphaned migration files, current database version, column existence, and known migration heads. | dep: bash, find, psql, grep
|
|
- update_db_password.py | Securely updates the PostgreSQL password for the 'headquarter' database user via a Docker container without exposing the password in shell history. | exp: func:main() → None, call:getpass.getpass, call:print, call:sys.exit, call:subprocess.run, call:result.stdout.strip | dep: getpass, subprocess, sys
|
|
## arch
|
|
Shell and Python scripts using Docker exec for container interaction, environment variable injection for secrets management, and Alembic introspection for migration state diagnosis.
|
|
## tags
|
|
migration, password, ghost, database, fix, main, call:getpass.getpass, call:print
|
|
## symbols
|
|
- main
|
|
- call:getpass.getpass
|
|
- call:print
|
|
- call:sys.exit
|
|
- call:subprocess.run
|
|
- call:result.stdout.strip
|
|
## workflows
|
|
- change scripts behavior
|
|
read: fix_ghost_migration.sh, update_db_password.py
|
|
## dirty
|
|
-
|