Update DB\Pgsql
This commit is contained in:
parent
c0994b1e1d
commit
2839c21416
1 changed files with 3 additions and 3 deletions
|
@ -189,13 +189,12 @@ class Pgsql
|
|||
public function indexExists(string $table, string $index, bool $noPrefix = false): bool
|
||||
{
|
||||
$table = ($noPrefix ? '' : $this->dbPrefix) . $table;
|
||||
$index = $table . '_' . ('PRIMARY' === $index ? 'pkey' : $index);
|
||||
|
||||
$vars = [
|
||||
':schema' => 'public',
|
||||
':tname' => $table,
|
||||
':ttype' => 'r',
|
||||
':iname' => $index,
|
||||
':iname' => $table . '_' . ('PRIMARY' === $index ? 'pkey' : $index),
|
||||
':itype' => 'i',
|
||||
];
|
||||
$query = 'SELECT 1
|
||||
|
@ -525,7 +524,8 @@ class Pgsql
|
|||
];
|
||||
$query = 'SELECT table_name, column_name, data_type
|
||||
FROM information_schema.columns
|
||||
WHERE table_catalog = current_database() AND table_schema = ?s:schema AND table_name LIKE ?s:tname';
|
||||
WHERE table_catalog = current_database() AND table_schema = ?s:schema AND table_name LIKE ?s:tname
|
||||
ORDER BY table_name';
|
||||
|
||||
$stmt = $this->db->query($query, $vars);
|
||||
$result = [];
|
||||
|
|
Loading…
Reference in a new issue