PhoenixKit.Install.DbConnectionCheck (phoenix_kit v1.7.107)

Copy Markdown View Source

Simple database connection check for PhoenixKit installation.

Summary

Functions

Returns true if the configured repo can reach the database, false otherwise.

Verifies database connectivity, exiting with a user-friendly error on failure.

Functions

connected?()

@spec connected?() :: boolean()

Returns true if the configured repo can reach the database, false otherwise.

ensure_connected!()

@spec ensure_connected!() :: :ok | no_return()

Verifies database connectivity, exiting with a user-friendly error on failure.

Returns :ok when the database is reachable.