mirror of
https://github.com/Fabio286/antares.git
synced 2025-04-07 23:11:06 +02:00
fix: unique keys not recognized in table settings on some MariaDB versions
This commit is contained in:
parent
53a71d55c5
commit
446199827b
@ -689,11 +689,11 @@ export class MySQLClient extends AntaresCore {
|
|||||||
|
|
||||||
return rows.map(row => {
|
return rows.map(row => {
|
||||||
return {
|
return {
|
||||||
unique: !row.Non_unique,
|
unique: !Number(row.Non_unique),
|
||||||
name: row.Key_name,
|
name: row.Key_name,
|
||||||
column: row.Column_name,
|
column: row.Column_name,
|
||||||
indexType: row.Index_type,
|
indexType: row.Index_type,
|
||||||
type: row.Key_name === 'PRIMARY' ? 'PRIMARY' : !row.Non_unique ? 'UNIQUE' : row.Index_type === 'FULLTEXT' ? 'FULLTEXT' : 'INDEX',
|
type: row.Key_name === 'PRIMARY' ? 'PRIMARY' : !Number(row.Non_unique) ? 'UNIQUE' : row.Index_type === 'FULLTEXT' ? 'FULLTEXT' : 'INDEX',
|
||||||
cardinality: row.Cardinality,
|
cardinality: row.Cardinality,
|
||||||
comment: row.Comment,
|
comment: row.Comment,
|
||||||
indexComment: row.Index_comment
|
indexComment: row.Index_comment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user