Create table
Creating tables is done with an object called createtable
. For available columns read version source columns
Format createtable
like this. The JSON snippet below shows createtable
inside a version. Every objectkey represents a table. As documented in version source columns, every objectkey inside a table represents a column.
{
"_id": "1.0.0",
"createtable": {
"table1": {
"primary_key": "id",
"id": {
"type": "INT",
"a_i": true
},
"name": {
"type": "VARCHAR".
"length": 20,
"default": "John"
}
},
"table2": {
"primary_key": "id",
"id": {
"type": "INT"
},
"description": {
"type": "TEXT",
"null": true
}
}
}
}