You are here

function DatabaseSchema::prefixNonTable in Drupal 7

Create names for indexes, primary keys and constraints.

This prevents using {} around non-table names like indexes and keys.

6 calls to DatabaseSchema::prefixNonTable()
DatabaseSchema_pgsql::addUniqueKey in includes/database/pgsql/schema.inc
Add a unique key.
DatabaseSchema_pgsql::createTableSql in includes/database/pgsql/schema.inc
Generate SQL to create a new table from a Drupal schema definition.
DatabaseSchema_pgsql::dropIndex in includes/database/pgsql/schema.inc
Drop an index.
DatabaseSchema_pgsql::dropPrimaryKey in includes/database/pgsql/schema.inc
Drop the primary key.
DatabaseSchema_pgsql::dropUniqueKey in includes/database/pgsql/schema.inc
Drop a unique key.

... See full list

File

includes/database/schema.inc, line 267

Class

DatabaseSchema
Base class for database schema definitions.

Code

function prefixNonTable($table) {
  $args = func_get_args();
  $info = $this
    ->getPrefixInfo($table);
  $args[0] = $info['table'];
  return implode('_', $args);
}