Skip to content

VSKI v0.6.0

SQL-based cron jobs can now specify a target database to execute queries against:

await client.cron.create({
name: "cleanup-tenant-logs",
schedule: "0 2 * * *",
type: "sql",
database: "tenant1", // Execute against specific database
sql: "DELETE FROM logs WHERE created < datetime('now', '-30 days')",
});

Previously, all SQL cron jobs executed against the default database. Now you can select any database from the dropdown in the dashboard or specify it via the API.

Workflow data is now stored in a dedicated workflows.db system database:

  • Isolation: Workflow runs, events, jobs, hooks, and waits are separated from user data
  • Performance: Workflow operations don’t impact user database performance
  • Replication-safe: The workflows database is automatically omitted from replication

This follows the same pattern as the existing stats database for system data.

Note: Replication is currently in beta. The feature is production-ready but may undergo changes based on feedback.

  • Master/Replica Modes: Run VSKI in master (default) or replica (read-only) mode
  • Pull-Based Sync: Replicas pull data from master via HTTP endpoints
  • Incremental Sync: Uses SQLite session extension for efficient changeset replication
  • Auto-Discovery: Replicas automatically discover and sync all databases
  • Simple Auth: Master and replica share the same JWT_SECRET - no additional keys needed
Terminal window
# Master server (default)
JWT_SECRET=your-shared-secret
REPLICA_MODE=master # optional, master is default
# Replica server
REPLICA_MODE=replica
MASTER_URL=https://master.example.com
JWT_SECRET=your-shared-secret # MUST match master
SYNC_INTERVAL=60 # seconds, 0 = manual only

Replicas authenticate using JWT tokens generated from the shared JWT_SECRET:

Terminal window
# Get master status (requires replica JWT)
curl -H "Authorization: Bearer <replica-jwt>" https://master.example.com/api/replica/status
# Download a database
curl -H "Authorization: Bearer <replica-jwt>" https://master.example.com/api/replica/db/tenant1
  • Added SQLite session extension support in vski-sqlite driver
  • New system tables: _replicas, _replication_state
  • New system database: workflows.db for all workflow-related data
  • Read-only middleware blocks all mutations when in replica mode
  • Schema versioning for detecting when full sync is required
  • Replica generates its own JWT token using shared JWT_SECRET

None. Replication is opt-in via environment variables. The workflows.db is created automatically on startup.

No migration required. New system tables and the workflows.db are created automatically on startup. Existing workflow data in default.db will need to be manually migrated if needed.