Change8

data-table-postgres@0.5.0

Breaking Changes
📦 remixView on GitHub →
5 breaking5 features🐛 2 fixes🔧 8 symbols

Summary

Introduced `createPostgresDatabase()` with enhanced features like connection-scoped migration locking and database wiping. Several breaking changes were made to the PostgreSQL adapter, and bound parameters are now used for compiled limit and offset clauses.

⚠️ Breaking Changes

  • Removed `PostgresDatabaseAdapter` and `createPostgresDatabaseAdapter()` from the public entry point. Use `PostgresDatabase` and `createPostgresDatabase()` instead.
  • The `wipe()` function now throws an error if no database name can be resolved from the connection config or `PGDATABASE`, instead of guessing `postgres`.
  • Migration lock acquisition is now bounded by a 60-second `lock_timeout` and fails with an error instead of waiting indefinitely.
  • Failed migration runs and failed transaction startups now destroy the reserved connection instead of returning a dirty session to the pool.
  • Nested migration lock acquisition now throws an error instead of deadlocking.

Migration Steps

  1. Replace `PostgresDatabaseAdapter` with `PostgresDatabase`.
  2. Replace `createPostgresDatabaseAdapter()` with `createPostgresDatabase()`.
  3. Update database wiping logic to ensure a database name is resolvable from connection config or `PGDATABASE`.

✨ New Features

  • Added `createPostgresDatabase()` with config-backed construction.
  • Added connection-scoped migration locking.
  • Added database wiping for `remix db`.
  • Added `close()` for releasing an internally created pool.
  • Use bound parameters for compiled `limit` and `offset` clauses.

🐛 Bug Fixes

  • Failed migration runs and failed transaction startup destroy the reserved connection instead of returning a dirty session to the pool.
  • Nested lock acquisition throws instead of deadlocking.

Affected Symbols