pub async fn setup_database() -> Result<Arc<DatabaseManager>>
Expand description
Initializes the deployment database and registers all platforms.
- Loads the database URL from environment variables or falls back to defaults.
- Connects to the database and wraps the manager in an
Arc
for shared access. - Discovers all platforms and pre-initializes their connection pools for fast access.
ยงErrors
Returns an error if the database connection or platform pool initialization fails.