diff options
Diffstat (limited to 'includes/database/mysql/schema.inc')
-rw-r--r-- | includes/database/mysql/schema.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc index b6b80af14..69500d3fa 100644 --- a/includes/database/mysql/schema.inc +++ b/includes/database/mysql/schema.inc @@ -287,7 +287,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function addField($table, $field, $spec, $keys_new = array()) { if (!$this->tableExists($table)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add field %table.%field: table doesn't exists.", array('%field' => $field, '%table' => $table))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add field %table.%field: table doesn't exist.", array('%field' => $field, '%table' => $table))); } if ($this->columnExists($table, $field)) { throw new DatabaseSchemaObjectExistsException(t("Cannot add field %table.%field: field already exists.", array('%field' => $field, '%table' => $table))); @@ -326,7 +326,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function fieldSetDefault($table, $field, $default) { if (!$this->columnExists($table, $field)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot set default value of field %table.%field: field doesn't exists.", array('%table' => $table, '%field' => $field))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot set default value of field %table.%field: field doesn't exist.", array('%table' => $table, '%field' => $field))); } if (is_null($default)) { @@ -341,7 +341,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function fieldSetNoDefault($table, $field) { if (!$this->columnExists($table, $field)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot remove default value of field %table.%field: field doesn't exists.", array('%table' => $table, '%field' => $field))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot remove default value of field %table.%field: field doesn't exist.", array('%table' => $table, '%field' => $field))); } $this->connection->query('ALTER TABLE {' . $table . '} ALTER COLUMN `' . $field . '` DROP DEFAULT'); @@ -353,7 +353,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function addPrimaryKey($table, $fields) { if (!$this->tableExists($table)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add primary key to table %table: table doesn't exists.", array('%table' => $table))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add primary key to table %table: table doesn't exist.", array('%table' => $table))); } if ($this->indexExists($table, 'PRIMARY')) { throw new DatabaseSchemaObjectExistsException(t("Cannot add primary key to table %table: primary key already exists.", array('%table' => $table))); @@ -373,7 +373,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function addUniqueKey($table, $name, $fields) { if (!$this->tableExists($table)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add unique key %name to table %table: table doesn't exists.", array('%table' => $table, '%name' => $name))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add unique key %name to table %table: table doesn't exist.", array('%table' => $table, '%name' => $name))); } if ($this->indexExists($table, $name)) { throw new DatabaseSchemaObjectExistsException(t("Cannot add unique key %name to table %table: unique key already exists.", array('%table' => $table, '%name' => $name))); @@ -393,7 +393,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function addIndex($table, $name, $fields) { if (!$this->tableExists($table)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add index %name to table %table: table doesn't exists.", array('%table' => $table, '%name' => $name))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add index %name to table %table: table doesn't exist.", array('%table' => $table, '%name' => $name))); } if ($this->indexExists($table, $name)) { throw new DatabaseSchemaObjectExistsException(t("Cannot add index %name to table %table: index already exists.", array('%table' => $table, '%name' => $name))); @@ -413,10 +413,10 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function changeField($table, $field, $field_new, $spec, $keys_new = array()) { if (!$this->columnExists($table, $field)) { - throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot change the definition of field %table.%name: field doesn't exists.", array('%table' => $table, '%name' => $field))); + throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot change the definition of field %table.%name: field doesn't exist.", array('%table' => $table, '%name' => $field))); } if (($field != $field_new) && $this->columnExists($table, $field_new)) { - throw new DatabaseSchemaObjectExistsException(t("Cannot rename field %table.%name to %name_new: target field already exists.", array('%table' => $table, '%name' => $name, '%name_new' => $field_new))); + throw new DatabaseSchemaObjectExistsException(t("Cannot rename field %table.%name to %name_new: target field already exists.", array('%table' => $table, '%name' => $field, '%name_new' => $field_new))); } $sql = 'ALTER TABLE {' . $table . '} CHANGE `' . $field . '` ' . $this->createFieldSql($field_new, $this->processField($spec)); |