Added diff to the tool
This commit is contained in:
@@ -344,11 +344,12 @@ func (r *Reader) parseIndex(line, tableName, schemaName string) *models.Index {
|
||||
for _, col := range strings.Split(columnsStr, ",") {
|
||||
columns = append(columns, stripQuotes(strings.TrimSpace(col)))
|
||||
}
|
||||
} else {
|
||||
} else if strings.Contains(line, "[") {
|
||||
// Single column format: columnname [attributes]
|
||||
// Extract column name before the bracket
|
||||
if strings.Contains(line, "[") {
|
||||
colName := strings.TrimSpace(line[:strings.Index(line, "[")])
|
||||
idx := strings.Index(line, "[")
|
||||
if idx > 0 {
|
||||
colName := strings.TrimSpace(line[:idx])
|
||||
if colName != "" {
|
||||
columns = []string{stripQuotes(colName)}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user