File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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 {
1515 s := bufio .NewScanner (strings .NewReader (contents ))
1616 var lines []string
1717 for s .Scan () {
18- if strings .HasPrefix (s .Text (), "-- +goose Down" ) {
18+ statement := strings .ToLower (s .Text ())
19+ if strings .HasPrefix (statement , "-- +goose down" ) {
1920 break
2021 }
21- if strings .HasPrefix (s . Text () , "-- +migrate Down " ) {
22+ if strings .HasPrefix (statement , "-- +migrate down " ) {
2223 break
2324 }
24- if strings .HasPrefix (s . Text () , "---- create above / drop below ----" ) {
25+ if strings .HasPrefix (statement , "---- create above / drop below ----" ) {
2526 break
2627 }
27- if strings .HasPrefix (s . Text () , "-- migrate:down" ) {
28+ if strings .HasPrefix (statement , "-- migrate:down" ) {
2829 break
2930 }
3031 lines = append (lines , s .Text ())
You can’t perform that action at this time.
0 commit comments