// all fieldnames have to be defined and should exist in schema.
foreach ($primaryKey['field'] as $fieldName) {
if (!$fieldName) {
- echo "Invalid field defination for index $name\n";
+ echo "Invalid field definition for index '$name' in table ${table['name']}\n";
return;
}
$parenOffset = strpos($fieldName, '(');
$fieldName = substr($fieldName, 0, $parenOffset);
}
if (!array_key_exists($fieldName, $fields)) {
- echo "Table does not contain $fieldName\n";
+ echo "Missing definition of field '$fieldName' for index '$name' in table ${table['name']}\n";
print_r($fields);
exit();
}
// all fieldnames have to be defined and should exist in schema.
foreach ($index['field'] as $fieldName) {
if (!$fieldName) {
- echo "Invalid field defination for index $indexName\n";
+ echo "Invalid field definition for index '$indexName'\n";
return;
}
$parenOffset = strpos($fieldName, '(');
$fieldName = substr($fieldName, 0, $parenOffset);
}
if (!array_key_exists($fieldName, $fields)) {
- echo "Table does not contain $fieldName\n";
+ echo "Missing definition of field '$fieldName' for index '$indexName'. Fields defined:\n";
print_r($fields);
exit();
}
/** need to make sure there is a field of type name */
if (!array_key_exists($name, $fields)) {
- echo "foreign $name in $currentTableName does not have a field definition, ignoring\n";
+ echo "Foreign key '$name' in $currentTableName does not have a field definition, ignoring\n";
return;
}