create_column

Declaration

create_column (name: STRING)

Description

Creates a column in the database. Call this function to create a valid column to use in other column functions. You cannot perform searches using a column name until you call this function for it.

Note: If a profile is loaded, then the columns stored with the profile are restored and all columns created by the script are removed. Use is_column and create_column to restore columns that an older profile may have removed.

See Also

is_column
database functions
Database

Example

script setup_database is
  create_column ('type') -- built-in column
  if not is_column ('section') then
    create_column ('section') -- user column
  end
end