Class: modifyTable

Adaptor~modifyTable(tableName, columns, options) → {Operation}

new modifyTable(tableName, columns, options) → {Operation}

Alter an existing table in the database.
Parameters:
Name Type Description
tableName string The name of the table to alter
columns array An array of form columns
options object Optional options argument
Source:
Returns:
Type
Operation
Example
modifyTable('table_name', state => state.data.map(
  newColumn => ({
    name: newColumn.name,
    type: newColumn.type,
    required: true, // optional
    unique: false, // optional - to be set to true for unique constraint
  })
));