Checks if a column exists in the given table.
$table: The name of the table in drupal (no prefixing).
$field: The name of the field.
TRUE if the given column exists, otherwise FALSE.
function db_field_exists($table, $field) {
return Database::getConnection()
->schema()
->fieldExists($table, $field);
}