Skip to content

postgres data type #81

@Valdenirmezadri

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/[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?

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