app_data
Variables
Section titled “Variables”AppDataSource
Section titled “AppDataSource”
constAppDataSource:DataSource
Defined in: app_data.ts:19
TypeORM DataSource configured for the guild’s PostgreSQL database.
Connection parameters are read from environment variables:
PGHOST— database hostnamePGPORT— database portPGUSER— database userPGPASSWORD— database passwordPOSTGRES_DB— database name
Entity classes are discovered via the glob ./entities/*.js.
Schema synchronisation is disabled — migrations are managed externally.
Functions
Section titled “Functions”initializeDataSource()
Section titled “initializeDataSource()”initializeDataSource():
Promise<void>
Defined in: app_data.ts:39
Initialises the AppDataSource connection pool.
Called once at application startup from index.ts.
On failure the process exits with code 1 so Railway restarts it.
Returns
Section titled “Returns”Promise<void>