Skip to content

postgres data type #81

Description

@Valdenirmezadri

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/postgres@v1.1.0/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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions