codenotary / immugorm

Apache License 2.0
16 stars 4 forks source link

GORM v1.23.5 Column Error #3

Open bdabak opened 2 years ago

bdabak commented 2 years ago

Hi,

I tried immugorm package with the latest gorm (v1.23.5).

But it gives an error like:

github.com/codenotary/immugorm

../../../../go/pkg/mod/github.com/codenotary/immugorm@v0.0.0-20220117103200-5d136efdb292/migrator.go:220:40: cannot use column (variable of type Column) as type gorm.ColumnType in argument to append: Column does not implement gorm.ColumnType (missing AutoIncrement method)

saul-data commented 1 year ago

I just had the same issue. I am using both postgresql and immudb

# github.com/codenotary/immugorm
/go/pkg/mod/github.com/codenotary/immugorm@v0.0.0-20220117103200-5d136efdb292/migrator.go:220:40: cannot use column (variable of type Column) as type gorm.ColumnType in argument to append:
        Column does not implement gorm.ColumnType (missing AutoIncrement method)
tutiplain commented 1 year ago

This repo is apparently not being maintained. Did anyone find a workaround for this error?

twinsant commented 1 year ago

same error

tutiplain commented 1 year ago

I was able to get around this error by downgrading both gorm and immugorm to a previous version. If I remember correctly, using immugorm 1.2.3 and gorm 2.03 solved the issue. Unfortunately, it seems this repo is dead and it doesn't look like there are any plans to update it (I made a PR in August which has not even been checked yet). Your best bet is to either downgrade, or to try and clone the repo and fix it yourself (I tried but the problem is much more complex than it seems).