Registry / database / sqlever

sqlever

JSON →
library0.3.0jsnpmunverified

Sqitch-compatible PostgreSQL migration tool (v0.3.0) with built-in static analysis, expand/contract workflows, batched DML, and AI-powered explanations. Released via npm and GitHub, compiled as a single binary with Bun for sub-50ms startup. Unlike Sqitch (Perl/JVM) and other tools, sqlever offers 22 safety rules, snapshot includes for reproducible deploys, and a TUI dashboard. Apache 2.0 licensed, no runtime dependencies.

npm install sqlever
INSTALL
IMPORT
SIG · SQLEVER
S
sqlever
databasejavascriptv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI
npx sqlever --help
const sqlever = require('sqlever')
sqlever is a CLI tool, not a library. Run via npx, bunx, or global install.

Full workflow: init project, add migration, write SQL, analyze, deploy, verify, check status.

# Initialize project sqlever init myapp --engine pg # Add migration sqlever add create_users -n "Create users table" # Edit deploy script cat > deploy/create_users.sql << 'SQL' CREATE TABLE users ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, email text NOT NULL UNIQUE, created_at timestamptz NOT NULL DEFAULT now() ); SQL # Analyze sqlever analyze # Deploy sqlever deploy db:pg://localhost/myapp # Verify sqlever verify db:pg://localhost/myapp # Status sqlever status db:pg://localhost/myapp
Debug
Known issues
gotchaSnapshot includes: \i resolves to git-correlated file version at migration addition time, not current HEAD. Use --no-snapshot for Sqitch-compatible behavior.
fix
Pass --no-snapshot flag to use HEAD versions, or ensure shared files are versioned correctly.
affects: >=0.3.0
gotchaRequires PostgreSQL 12+ for batched DML and expand/contract features.
fix
Upgrade PostgreSQL or avoid these features.
affects: >=0.1.0
breakingCLI options may change without notice in v0.x releases. No stable API yet.
fix
Pin exact version in CI, or wait for v1.0.
affects: <1.0.0
gotchaBundled with Bun; not available as a library import. Only CLI usage.
fix
Use npx, bunx, or install globally.
affects: >=0.1.0
gotchaDatabase connection string must be prefixed with db:pg:// (not just postgres://).
fix
Use correct format: db:pg://user:pass@host/dbname
affects: >=0.1.0
Errors
Common errors & fixes
sqlever: error: unable to connect to database: connection string must start with 'db:pg://'
Incorrect database URL format (e.g., postgres:// instead of db:pg://).
fix
Use format: db:pg://user:pass@host/dbname
Error: snapshot includes require git repository in migration directory
Running migration outside a git repo with snapshot mode enabled.
fix
Initialize git repo, or pass --no-snapshot to use current HEAD versions.
sqlever: error: PostgreSQL version 12+ required for batched DML
PostgreSQL version <12 not supported for batched DML feature.
fix
Upgrade PostgreSQL to 12+ or avoid batched DML.
Upgrade
Version history
0.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
18
Meta
2
OpenAI (training)
1
Resources
sqlever — npm install sqlever · libregistry