Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/schema/PhabricatorConfigSchemaQuery.php
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | private function loadActualSchemaForServer(PhabricatorDatabaseRef $ref) { | ||||
} | } | ||||
if ($sql) { | if ($sql) { | ||||
$column_info = queryfx_all( | $column_info = queryfx_all( | ||||
$conn, | $conn, | ||||
'SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, CHARACTER_SET_NAME, | 'SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, CHARACTER_SET_NAME, | ||||
COLLATION_NAME, COLUMN_TYPE, IS_NULLABLE, EXTRA | COLLATION_NAME, COLUMN_TYPE, IS_NULLABLE, EXTRA | ||||
FROM INFORMATION_SCHEMA.COLUMNS | FROM INFORMATION_SCHEMA.COLUMNS | ||||
WHERE (%Q)', | WHERE %LO', | ||||
'('.implode(') OR (', $sql).')'); | $sql); | ||||
$column_info = igroup($column_info, 'TABLE_SCHEMA'); | $column_info = igroup($column_info, 'TABLE_SCHEMA'); | ||||
} else { | } else { | ||||
$column_info = array(); | $column_info = array(); | ||||
} | } | ||||
// NOTE: Tables like KEY_COLUMN_USAGE and TABLE_CONSTRAINTS only contain | // NOTE: Tables like KEY_COLUMN_USAGE and TABLE_CONSTRAINTS only contain | ||||
// primary, unique, and foreign keys, so we can't use them here. We pull | // primary, unique, and foreign keys, so we can't use them here. We pull | ||||
// indexes later on using SHOW INDEXES. | // indexes later on using SHOW INDEXES. | ||||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |