More Roundtrip tests
This commit is contained in:
@@ -272,6 +272,10 @@ func (r *Reader) parseColumn(line, tableName, schemaName string) (*models.Column
|
||||
if constraint == nil {
|
||||
constraint = uniqueConstraint
|
||||
}
|
||||
} else if strings.HasPrefix(attr, "note:") {
|
||||
// Parse column note/comment
|
||||
note := strings.TrimSpace(strings.TrimPrefix(attr, "note:"))
|
||||
column.Comment = strings.Trim(note, "'\"")
|
||||
} else if strings.HasPrefix(attr, "ref:") {
|
||||
// Parse inline reference
|
||||
// DBML semantics depend on context:
|
||||
@@ -355,7 +359,7 @@ func (r *Reader) parseIndex(line, tableName, schemaName string) *models.Index {
|
||||
return nil
|
||||
}
|
||||
|
||||
index := models.InitIndex("")
|
||||
index := models.InitIndex("", tableName, schemaName)
|
||||
index.Table = tableName
|
||||
index.Schema = schemaName
|
||||
index.Columns = columns
|
||||
|
||||
Reference in New Issue
Block a user