(other *Migration)
| 134 | } |
| 135 | |
| 136 | func (m Migration) Less(other *Migration) bool { |
| 137 | switch { |
| 138 | case m.isNumeric() && other.isNumeric() && m.VersionInt() != other.VersionInt(): |
| 139 | return m.VersionInt() < other.VersionInt() |
| 140 | case m.isNumeric() && !other.isNumeric(): |
| 141 | return true |
| 142 | case !m.isNumeric() && other.isNumeric(): |
| 143 | return false |
| 144 | default: |
| 145 | return m.Id < other.Id |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | func (m Migration) isNumeric() bool { |
| 150 | return len(m.NumberPrefixMatches()) > 0 |
nothing calls this directly
no test coverage detected