neoq/backends/postgres
2024-06-07 07:22:07 -07:00
..
migrations feat: Make fingerprint unique to each queue 2024-03-02 10:56:29 -07:00
postgres_backend.go feat: Add public jobs.WithJobContext() 2024-06-07 07:22:07 -07:00
postgres_backend_test.go feat: add support for recovery callbacks 2024-04-16 13:52:54 -06:00
README.md Support postgres backend schema migrations 2023-08-28 08:59:40 +02:00

Migrations

Migrations are implemented with https://github.com/golang-migrate/migrate

Install the CLI

To add new migrations, install the CLI. The version of the CLI is not particularly important.

go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.16.2

Adding migrations

Adding new migrations is done with the migrate create command

migrate create -dir backends/postgres/migrations -ext sql <descriptive_migration_name>

Running migrations

Migrations are run every time neoq initializes the postgres backend. There is no need to run migrations explicitly.