From 47c9bea46f2313ba8a3ddfc497c78e6eca246cb1 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Mon, 17 Aug 2020 17:01:42 +0300 Subject: [PATCH] [DATABASE][PostgreSQL] Ignore index prefix length --- lib/database/pgsqlschema.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/database/pgsqlschema.php b/lib/database/pgsqlschema.php index 1f47e69755..a6a6227edd 100644 --- a/lib/database/pgsqlschema.php +++ b/lib/database/pgsqlschema.php @@ -539,9 +539,11 @@ class PgsqlSchema extends Schema if (!empty($tableDef['primary key'])) { $tableDef['primary key'] = $this->filterKeyDef($tableDef['primary key']); } - if (!empty($tableDef['unique keys'])) { - foreach ($tableDef['unique keys'] as $i => $def) { - $tableDef['unique keys'][$i] = $this->filterKeyDef($def); + foreach (['unique keys', 'indexes'] as $type) { + if (!empty($tableDef[$type])) { + foreach ($tableDef[$type] as $k => $def) { + $tableDef[$type][$k] = $this->filterKeyDef($def); + } } } return $tableDef;