Skip to main content

Add table column

Adds a new column to an existing table

Function AddTableColumn(Val Table, Val Name, Val DataType, Val Connection = "") Export

ParameterCLI optionTypeRequiredDescription
Table--tableStringTable name
Name--nameStringColumn name
DataType--typeStringColumn data type
Connection--dbString, ArbitraryExisting connection or database path
Returns

Map Of KeyAndValue - Result of query execution

1C:Enterprise/OneScript code example
Base = "/tmp/vnnmoosn.qqb.sqlite";
Table = "test";
Name = "new_col";
DataType = "TEXT";

Result = OPI_SQLite.AddTableColumn(Table, Name, DataType, Base);
oint sqlite AddTableColumn \
--table "test" \
--name "new_col" \
--type "TEXT" \
--db "/tmp/v3fibjxn.cs0.sqlite"
Result
{
"result": true
}