Skip to content
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

postgres data type #81

Open
Valdenirmezadri opened this issue Jun 6, 2022 · 0 comments
Open

postgres data type #81

Valdenirmezadri opened this issue Jun 6, 2022 · 0 comments

Comments

@Valdenirmezadri
Copy link

hello

I'm using gorm 2.0 in a project for 2 years with postgres and uint for ID, gorm migrator created all columns as bigint

when i tried to use your package it generated a problem
/home/junior/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:241 ERROR: column "arquivo_id" cannot be cast automatically to type bit (SQLSTATE 42804) %!s(float64=0.66215) %!s(int64=0) ALTER TABLE "notifications" ALTER COLUMN "arquivo_id" TYPE bit(64)]

migrator is trying to change column datatype but by default in gorm it is bigint

see
image

is this behavior expected? need to fix? Or is there a way to get around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant