database

package
v0.0.0-...-91b10cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dataSourceName string) (*pgxpool.Pool, error)

Connect to a database and verify with a ping.

func RunMigrations

func RunMigrations(dataSourceName string) error

Run migrations runs migrations for the database. It uses the `MIGRATIONS_PATH` environment variable to specify the path to the migrations. If the variable is not set, it defaults to `file:///migrations`. The `ErrNoChange` error is ignored, as it means that there are no migrations to run.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL