Getting started with version sources
A version source is a file that holds version information for the database. It basically is a template for the database.
The version source is a JSON
tree. In the root we supply a name
and version
. The name
is used to prevent the use of multiple version sources on one database.
version
is an array of versions AlphaDB will walk over when updating the database.
In the root, a version source should look like this.
{
"name": "template-name",
"version": [
...
]
}
Why JSON?
The main motivation behind the choice to go with JSON is compatibility with NoSQL databases. Projects like MongoDB (opens in a new tab) and Firestore (opens in a new tab) can store this structure very easily. With the use of these databases, it's really easy to distribute new version data over the internet.