From 003bcc3a3556cd2891b62bdede1fdebf67d0f883 Mon Sep 17 00:00:00 2001 From: Dave Shrewsberry Date: Thu, 1 Aug 2024 17:26:20 -0400 Subject: [PATCH] more tracing --- migrator/migrator.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migrator/migrator.go b/migrator/migrator.go index 079754e1..56fe3872 100644 --- a/migrator/migrator.go +++ b/migrator/migrator.go @@ -710,7 +710,7 @@ func (m Migrator) GuessConstraintInterfaceAndTable(stmt *gorm.Statement, name st for _, rel := range stmt.Schema.Relationships.Relations { if constraint := rel.ParseConstraint(); constraint != nil && constraint.Name == name { - fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for relation 0 %q", constraint)) + fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for relation 0 %v", constraint)) return constraint, getTable(rel) } } @@ -719,7 +719,7 @@ func (m Migrator) GuessConstraintInterfaceAndTable(stmt *gorm.Statement, name st for k := range checkConstraints { if checkConstraints[k].Field == field { v := checkConstraints[k] - fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for check %q", &v)) + fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for check %v", &v)) return &v, stmt.Table } } @@ -727,14 +727,14 @@ func (m Migrator) GuessConstraintInterfaceAndTable(stmt *gorm.Statement, name st for k := range uniqueConstraints { if uniqueConstraints[k].Field == field { v := uniqueConstraints[k] - fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for unique %q", &v)) + fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for unique %v", &v)) return &v, stmt.Table } } for _, rel := range stmt.Schema.Relationships.Relations { if constraint := rel.ParseConstraint(); constraint != nil && rel.Field == field { - fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for relation %q", constraint)) + fmt.Println(fmt.Sprintf("SHREWS --Out of Guess for relation %v", constraint)) return constraint, getTable(rel) } }