Refactored db logic. Can now specify schema in config
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
database:
|
||||
url: "sqlite+aiosqlite:///alpinebits.db" # For local dev, use SQLite. For prod, override with PostgreSQL URL.
|
||||
# url: "postgresql://user:password@host:port/dbname" # Example for Postgres
|
||||
# url: "postgresql+asyncpg://user:password@host:port/dbname" # Example for Postgres
|
||||
# schema: "alpinebits" # Optional: PostgreSQL schema name (default: public)
|
||||
|
||||
# AlpineBits Python config
|
||||
# Use annotatedyaml for secrets and environment-specific overrides
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
database:
|
||||
url: "postgresql+asyncpg://username:password@hostname:5432/database_name"
|
||||
# Example: "postgresql+asyncpg://alpinebits_user:your_password@localhost:5432/alpinebits"
|
||||
schema: "alpinebits" # Optional: PostgreSQL schema name (default: public)
|
||||
|
||||
# If using annotatedyaml secrets:
|
||||
# database:
|
||||
# url: !secret POSTGRES_URL
|
||||
# schema: "alpinebits" # Optional: PostgreSQL schema name
|
||||
#
|
||||
# Then in secrets.yaml:
|
||||
# POSTGRES_URL: "postgresql+asyncpg://username:password@hostname:5432/database_name"
|
||||
|
||||
Reference in New Issue
Block a user