More Roundtrip tests
Some checks are pending
CI / Test (1.23) (push) Waiting to run
CI / Test (1.24) (push) Waiting to run
CI / Test (1.25) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build (push) Waiting to run

This commit is contained in:
2025-12-17 22:52:24 +02:00
parent 5e1448dcdb
commit a427aa5537
23 changed files with 22897 additions and 1319 deletions

View File

@@ -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