Skip to Content
This documentation is still under construction
A version

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.

{ "engine": "postgres", "name": "template-name", "version": [ { "_id": "10.0.1" } ] }

A version should be string with a numeric value. The value is allowed to be separated by dots. AlphaDB will remove any dots and convert the leftover 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.

{ "engine": "postgres", "name": "template-name", "version": [ { "_id": "10.0.1", "createtable": { "table1": { "col1": { "type": "INTEGER", "unique": true }, "col2": { "type": "VARCHAR", "length": 100, "null": true } } } } ] }

Column types and some attributes, such as auto-incrementing columns, depend on the database engine. See Database engines.

For more information, read about all available methods.

Last updated on