Tablerizer (v3.0.1) is a PostgreSQL table export wizard that generates SQL files for recreating table privileges (RBAC), Row-Level Security (RLS) policies, triggers, constraints, and schema documentation. It supports multi-schema exports, role mapping with placeholders, idempotent scripts with cleanup sections, and can export both tables and stored procedures/functions. It is designed for database migrations, environment synchronization, and integration with Graphile Migrate. The tool offers a CLI and a TypeScript library, with flexible configuration via CLI args, config files, or environment variables. Node.js >=18.0.0 required.
npm install tablerizerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates exporting tables and functions with role mapping and progress output via the library API.
Upgrade Node.js to v18 or later.
Use import statements instead of require(). If your project uses CommonJS, consider dynamic import().
Install TypeScript ^6.0.3 or adjust your tsconfig.json to use skipLibCheck.
Verify that DATABASE_URL is set and the PostgreSQL server is reachable.
Ensure role_mappings keys match exactly the roles returned by PostgreSQL.
Change to import { Tablerizer } from 'tablerizer' or use dynamic import.Ensure the instance is created and connected, then call export(). Do not reuse after disconnect().
List existing roles with `\du` in psql and match the role name exactly in roles array.