You are here

function schema_engine_type in Schema 5

Same name and namespace in other branches
  1. 8 schema.module \schema_engine_type()
  2. 6 schema.module \schema_engine_type()
  3. 7 schema.module \schema_engine_type()
2 calls to schema_engine_type()
schema_compare_table in ./schema.module
schema_mysql_create_table_sql in engines/schema_mysql.inc

File

./schema.module, line 155

Code

function schema_engine_type($col, $table, $field, $engine = NULL) {
  $map = schema_engine_invoke($engine, 'engine_type_map');
  $size = isset($col['size']) ? $col['size'] : 'normal';
  $type = $col['type'] . ':' . $size;
  if (isset($map[$type])) {
    return $map[$type];
  }
  else {
    drupal_set_message(t('%table.%field: no %engine type for Schema type %type.', array(
      '%engine' => $engine,
      '%type' => $type,
      '%table' => $table,
      '%field' => $field,
    )), 'error');
    return $col['type'];
  }
}