Version source default data
In a version source you have the option to provide the database with default data. This data is written within a version
. Create a key default_data
. To this object tables can be provided with an array of data.
In this case we create one table customers
and insert two rows of data.
{
"_id": "10.0.1",
"createtable": {
"customers": {
"primary_key": "id",
"id": {
"type": "INT",
"a_i": true
},
"name": {
"type": "VARCHAR",
"length": 100
},
"description": {
"type": "TEXT",
"null": true
}
}
},
"default_data": {
"table1": [
{ "name": "Josh", "description": "An actual customer" },
{ "name": "Bert" }
]
}
}