@@ -2,7 +2,6 @@ package diff
22
33import (
44 "fmt"
5- "strconv"
65 "strings"
76
87 "github.com/meru143/dbdiff/pkg/types"
@@ -136,17 +135,17 @@ func (e *DiffEngine) compareSequences() types.DiffList {
136135 Type : types .DiffAlter ,
137136 Object : types .ObjectSequence ,
138137 Name : name ,
139- OldValue : strconv . FormatInt ( targetSeq .Start , 10 ),
140- NewValue : strconv . FormatInt ( sourceSeq .Start , 10 ),
138+ OldValue : fmt . Sprintf ( "%d" , targetSeq .Start ),
139+ NewValue : fmt . Sprintf ( "%d" , sourceSeq .Start ),
141140 })
142141 }
143142 if sourceSeq .Increment != targetSeq .Increment {
144143 differences = append (differences , types.Diff {
145144 Type : types .DiffAlter ,
146145 Object : types .ObjectSequence ,
147146 Name : name ,
148- OldValue : "INCREMENT BY " + strconv . FormatInt ( targetSeq .Increment , 10 ),
149- NewValue : "INCREMENT BY " + strconv . FormatInt ( sourceSeq .Increment , 10 ),
147+ OldValue : fmt . Sprintf ( "INCREMENT BY %d" , targetSeq .Increment ),
148+ NewValue : fmt . Sprintf ( "INCREMENT BY %d" , sourceSeq .Increment ),
150149 })
151150 }
152151 // Min value change
@@ -155,8 +154,8 @@ func (e *DiffEngine) compareSequences() types.DiffList {
155154 Type : types .DiffAlter ,
156155 Object : types .ObjectSequence ,
157156 Name : name ,
158- OldValue : "MINVALUE " + strconv . FormatInt ( targetSeq .MinValue , 10 ),
159- NewValue : "MINVALUE " + strconv . FormatInt ( sourceSeq .MinValue , 10 ),
157+ OldValue : fmt . Sprintf ( "MINVALUE %d" , targetSeq .MinValue ),
158+ NewValue : fmt . Sprintf ( "MINVALUE %d" , sourceSeq .MinValue ),
160159 })
161160 }
162161 // Max value change
@@ -165,8 +164,8 @@ func (e *DiffEngine) compareSequences() types.DiffList {
165164 Type : types .DiffAlter ,
166165 Object : types .ObjectSequence ,
167166 Name : name ,
168- OldValue : "MAXVALUE " + strconv . FormatInt ( targetSeq .MaxValue , 10 ),
169- NewValue : "MAXVALUE " + strconv . FormatInt ( sourceSeq .MaxValue , 10 ),
167+ OldValue : fmt . Sprintf ( "MAXVALUE %d" , targetSeq .MaxValue ),
168+ NewValue : fmt . Sprintf ( "MAXVALUE %d" , sourceSeq .MaxValue ),
170169 })
171170 }
172171 }
0 commit comments