VSKI v0.6.0
Features
Section titled “Features”Cron Jobs: Target Database Selection
Section titled “Cron Jobs: Target Database Selection”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.
Workflows System Database
Section titled “Workflows System Database”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
workflowsdatabase is automatically omitted from replication
This follows the same pattern as the existing stats database for system data.
Replication (Beta)
Section titled “Replication (Beta)”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
Configuration
Section titled “Configuration”# Master server (default)JWT_SECRET=your-shared-secretREPLICA_MODE=master # optional, master is default
# Replica serverREPLICA_MODE=replicaMASTER_URL=https://master.example.comJWT_SECRET=your-shared-secret # MUST match masterSYNC_INTERVAL=60 # seconds, 0 = manual onlyReplica Endpoints
Section titled “Replica Endpoints”Replicas authenticate using JWT tokens generated from the shared JWT_SECRET:
# Get master status (requires replica JWT)curl -H "Authorization: Bearer <replica-jwt>" https://master.example.com/api/replica/status
# Download a databasecurl -H "Authorization: Bearer <replica-jwt>" https://master.example.com/api/replica/db/tenant1Technical Details
Section titled “Technical Details”- Added SQLite session extension support in vski-sqlite driver
- New system tables:
_replicas,_replication_state - New system database:
workflows.dbfor 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
Breaking Changes
Section titled “Breaking Changes”None. Replication is opt-in via environment variables. The workflows.db is created automatically on startup.
Migration
Section titled “Migration”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.