bugfix inverted UNIQUE parameter in db_schema and mustal

This commit is contained in:
OpenXE 2023-04-02 11:46:17 +02:00
parent d97f41e293
commit 85094921a0
2 changed files with 510 additions and 504 deletions

File diff suppressed because it is too large Load Diff

View File

@ -140,8 +140,14 @@ function mustal_load_tables_from_db(string $host, string $schema, string $user,
$composed_key = array();
$composed_key['Key_name'] = $key['Key_name'];
$composed_key['Index_type'] = $key['Index_type'];
$composed_key['Non_unique'] = ($key['Non_unique'] == 1)?'UNIQUE':'';
$composed_key['columns'][] = $key['Column_name'];
if ($key['Key_name'] != 'PRIMARY') {
$composed_key['Non_unique'] = ($key['Non_unique'] == 1)?'':'UNIQUE';
} else {
$composed_key['Non_unique'] = '';
}
$composed_keys[] = $composed_key;
} else {
// Given key, add column