alby-hub/db
Roman D df9393194a
feat: PostgreSQL support (#922)
* feat: enable Postgres connections

* feat: implement migration templates

* feat: convert sqlite-specific migrations to migration templates; adjust SQL syntax

* fix: add migration to fix postgres incompatibilities in the DB schema

* fix: correct SQL syntax for comparisons in the transactions service

* feat: database migration tool

* chore: update tests for testing with Postgres

* fix: update test

* fix: explicitly store mock timestamps in UTC

* chore: add txdb to go.mod and run tidy

* fix: serialize concurrent transactions when running tests with txdb

* chore: update README to mention postgres

* fix: use timestamptz in Postgres

* test: add Github action for testing the backend with Postgres

* chore: fix migration name and add comments

* docs: add db migration notes to README

* fix: address PR feedback

* fix: rename the cmd/migrate tool to cmd/db_migrate

* feat: add schema check in the DB migration tool

* test: use testdb instead of txdb for testing with Postgresql

* fix: fix tests after merge

* chore: comment out unused VACUUM in migrations

* fix: reset Postgres sequences after migrating data

* docs: update migrate command in readme

* fix: do not allow backup for migration when postgres is enabled

* chore: add debug logs for db backend type

* chore: use Logrus instead of slog for db_migrate

* fix: initialize logger in the keys tests

* test: add db_migrate test

* fix: use transaction object in db_migrate function

* fix: txlock in db migration test

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-16 17:17:24 +07:00
..
migrations feat: PostgreSQL support (#922) 2025-01-16 17:17:24 +07:00
queries feat: PostgreSQL support (#922) 2025-01-16 17:17:24 +07:00
db.go feat: PostgreSQL support (#922) 2025-01-16 17:17:24 +07:00
models.go feat: app child key derived from wallet master key (#736) 2024-11-07 19:06:01 +07:00