VSKI v0.7.0
Per-Database Collection Names
Section titled “Per-Database Collection Names”Collection names are now scoped per database instead of globally unique.
Two databases may each have an orders collection - they are fully
independent namespaces with independent schemas, records, views, indexes,
realtime topics, and tombstones. Multi-tenant consumers no longer need to
prefix collection names to avoid collisions.
Breaking Changes
Section titled “Breaking Changes”- Bare-name cross-database access no longer falls back to a global
lookup. Collection names and IDs resolve strictly within the database
addressed by the
x-dbnameheader (defaultdefault); a wrong or missing header is a 404. Cross-database access must qualify the database (client.db(name).collection(...),collection(name, db), or thex-dbnameheader). - Registry uniqueness is now
(dbName, name)instead ofnamealone. Creating a collection that duplicates a live name in the same database still fails withCollection name already exists; the same name in another database is allowed. - Realtime topics are keyed
(db, name)and the connection’s?db=parameter is authoritative: SUBSCRIBE resolves the collection in that database and a miss is a loud ERROR frame. EVENT/SUBSCRIBED frames carry a new additivedbfield. - Duplicate relation targets must be qualified. Relation fields may
declare an optional
options.dbfor cross-database targets; relations without it resolve in the source collection’s own database (then a unique global match). A name present in several databases with no qualifier is a 400 naming the candidates.
Compatibility
Section titled “Compatibility”- System collections (
_users,_stats_*, workflow queues) are platform-global and keep resolving from any namespace - stats and workflow surfaces are unchanged. - Legacy database files migrate automatically on boot: the inline
UNIQUE(name)constraint is replaced by theuq_collections_db_namecomposite index via an idempotent table rebuild; rows are preserved. - Create-over-tombstone now revives the tombstoned row under its original id instead of a blind name-keyed resurrection followed by an error.
- Options-based views in non-default databases now resolve (the options lookup previously ran against the target file, which never holds registry rows).
- client (TS/JS): registry ops accept a database scope
(
client.db(name).settings), realtime subscriptions re-key to thedb:nametopic and dispatch on the frame’sdb. - client-python: every
settings.collectionsmethod takes an optionaldb; realtime dispatch filters subscription entries by the frame’sdb.client.collection(name, db)was already scoped.