2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
// Split the key into schema and table for querying.
$schema=$prefixInfo['schema'];
$table_name=$prefixInfo['table'];
$field_information=(object)array(
'checks'=>array(),
);
$checks=$this->connection->query("SELECT conname FROM pg_class cl INNER JOIN pg_constraint co ON co.conrelid = cl.oid INNER JOIN pg_attribute attr ON attr.attrelid = cl.oid AND attr.attnum = ANY (co.conkey) INNER JOIN pg_namespace ns ON cl.relnamespace = ns.oid WHERE co.contype = 'c' AND ns.nspname = :schema AND cl.relname = :table AND attr.attname = :column",array(
':schema'=>$schema,
':table'=>$table_name,
':column'=>$field,
));
$field_information=$checks->fetchCol();
return$field_information;
}
/**
* Generate SQL to create a new table from a Drupal schema definition.
*
...
...
@@ -469,13 +502,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
thrownewDatabaseSchemaObjectExistsException(t("Cannot rename field %table.%name to %name_new: target field already exists.",array('%table'=>$table,'%name'=>$field,'%name_new'=>$field_new)));