File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,17 @@ func RemoveRollbackStatements(contents string) string {
15
15
s := bufio .NewScanner (strings .NewReader (contents ))
16
16
var lines []string
17
17
for s .Scan () {
18
- if strings .HasPrefix (s .Text (), "-- +goose Down" ) {
18
+ statement := strings .ToLower (s .Text ())
19
+ if strings .HasPrefix (statement , "-- +goose down" ) {
19
20
break
20
21
}
21
- if strings .HasPrefix (s . Text () , "-- +migrate Down " ) {
22
+ if strings .HasPrefix (statement , "-- +migrate down " ) {
22
23
break
23
24
}
24
- if strings .HasPrefix (s . Text () , "---- create above / drop below ----" ) {
25
+ if strings .HasPrefix (statement , "---- create above / drop below ----" ) {
25
26
break
26
27
}
27
- if strings .HasPrefix (s . Text () , "-- migrate:down" ) {
28
+ if strings .HasPrefix (statement , "-- migrate:down" ) {
28
29
break
29
30
}
30
31
lines = append (lines , s .Text ())
You can’t perform that action at this time.
0 commit comments