Defining a version
Version number
A version should be defined as an object. It's required to have a version number as value of the key _id
.
{
"_id": "10.0.1"
}
The version should be string
with a numeric
value. The value is allowed to be seperated by dots. AlphaDB will remove any dots and convert the leftonver to an integer.
Version data
AlphaDB will loop over all keys in the version object. In a version, object keys represent a method
. In this example we will create a new table called table1
.
{
"_id": "10.0.1",
"createtable": {
"table1": {
"col1": {
"type": "INT",
"unique": true
},
"col2": {
"type": "VARCHAR",
"length": 100,
"null": true
}
}
}
}
For more information, read about all available methods.