Other Databases
Zingat primarily targets PostgreSQL and SQLite, but the SQLx layer also supports other SQL backends. This page lists the commonly used alternatives and how to point Zingat at them.Choose PostgreSQL for production; prefer SQLite for lightweight, single-node deployments and tests.
Environment variable
Zingat reads the connection string from theDATABASE_URL environment variable.
PostgreSQL)
- Why use it: Mature, robust, great concurrency, rich SQL features
- Notes: Ensure
sqlxPostgres feature is enabled at build-time
SQLite (lightweight)
- Why use it: Zero-config, fast for small deployments and CI
- Notes: Concurrency is limited; prefer PostgreSQL for multi-user traffic
MySQL / MariaDB
- Why use it: Existing infra or operational preference
- Notes: Ensure
sqlxMySQL feature is enabled; verify SQL dialect differences
Microsoft SQL Server
- Why use it: Enterprise environments standardized on SQL Server
- Notes: Some SQL features differ; test migrations and queries
CockroachDB (Postgres wire-compatible)
- Why use it: Horizontal scalability with Postgres compatibility
- Notes: Validate transactional semantics and any
SERIAL/BIGSERIALusage
Verify connectivity
Usexh to sanity-check the API after switching databases.
Migrations
Run migrations after changingDATABASE_URL:
If you switch database engines, re-run migrations from a clean database to avoid dialect drift.