Medic.Checks.Postgres (Medic v0.2.0) View Source
Checks that Postgres is running, and is set up correctly.
Examples
{Check.Postgres, :running?},
{Check.Postgres, :correct_version_running?},
{Check.Postgres, :role_exists?},
{Check.Postgres, :correct_data_directory?},
{Check.Postgres, :database_exists?, ["my_db"]}
Link to this section Summary
Functions
Checks that the running instance of Postgres has the expected data directory.
If run with no arguments, this expects that the data directory is located at .priv/postgres/data
within the current project.
Checks that the running Postgres database matches the version defined
in ASDF's .tool-versions
file.
Checks that the named database exists in the running Postgres instance.
Checks that a user postgres
has been created in the running instance.
Checks whether Postgres is running, by attempting to list all databases.
Link to this section Functions
Checks that the running instance of Postgres has the expected data directory.
If run with no arguments, this expects that the data directory is located at .priv/postgres/data
within the current project.
Usage
{Medic.Checks.Postgres, :correct_data_directory}
{Medic.Checks.Postgres, :correct_data_directory, ["/path/to/data/directory"]}
Checks that the running Postgres database matches the version defined
in ASDF's .tool-versions
file.
Checks that the named database exists in the running Postgres instance.
Usage
{Medic.Checks.Postgres, :database_exists?, ["my_db_dev"]}
Checks that a user postgres
has been created in the running instance.
Checks whether Postgres is running, by attempting to list all databases.