New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate up fails on negative int #213
Comments
What do your migration sources look like? e.g. how many migrations are there? The value |
@dhui Thank you for the quick reply. only have one migration:
|
The issue is that the date is being used as the migration version number, which overflow 32-bit ints package main
import (
"fmt"
"strconv"
)
func main() {
s := "20181110175944"
i, err := strconv.ParseUint(s, 10, 64)
if err != nil {
fmt.Println("Got parsing error:", err)
return
}
fmt.Println("Parsed int:", i)
ui32 := uint32(i)
fmt.Println("Uint32:", ui32)
i32 := int32(i)
fmt.Println("Int32:", i32)
}
/* Prints:
Parsed int: 20181110175944
Uint32: 3353819336
Int32: -941147960
*/ For now, the workaround is to specify either the To fix this issue in the longterm, we could explicitly use |
I've create a separate issue to track the longterm fix: #214 |
@dhui |
Describe the Bug
Getting a weird error when trying to migrate initial db scheme on ARM.
i dont see this error on amd64, and as far is i know the number is "large" enough that 32bit limit is hit?
Am i missing something?
Expected Behavior
Migration as when running on x86_64 platform
Migrate Version
v4.3.1
Loaded Source Drivers
file
Loaded Database Drivers
mysql
Go Version
go version go1.12 linux/arm
Stacktrace
Additional context
I am only using signed INTs in the db scheme.
The text was updated successfully, but these errors were encountered: