https://github.com/go-gorm/sharding 1.30.0 Version incompatibility
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: erdong01
{"@timestamp":"2025-07-23T17:24:28.573+08:00","caller":"db/logger.go:107","content":"Database SQL","duration":"0.831ms","level":"info","rows":-1,"sql":"SELECT DATABASE()"} {"@timestamp":"2025-07-23T17:24:28.576+08:00","caller":"db/logger.go:107","content":"Database SQL","duration":"2.753ms","level":"info","rows":1,"sql":"SELECT SCHEMA_NAME from Information_schema.SCHEMATA where SCHEMA_NAME LIKE 'mloss%' ORDER BY SCHEMA_NAME='mloss' DESC,SCHEMA_NAME limit 1"} {"@timestamp":"2025-07-23T17:24:28.579+08:00","caller":"db/logger.go:107","content":"Database SQL","duration":"3.064ms","level":"info","rows":-1,"sql":"SELECT count(*) FROM information_schema.tables WHERE table_schema = 'mloss' AND table_name = 'tl_request_202507' AND table_type = 'BASE TABLE'"} panic: interface conversion: sharding.ShardingMigrator is not migrator.BuildIndexOptionsInterface: missing method BuildIndexOptions
goroutine 1 [running]: gorm.io/gorm/migrator.Migrator.CreateTable.func1(0x14000537c20) /Users/apple/go/pkg/mod/gorm.io/gorm@v1.30.0/migrator/migrator.go:272 +0x10ec gorm.io/gorm/migrator.Migrator.RunWithValue({{0x10?, 0x1400052ce10?, {0x102c1a848?, 0x140000c41c0?}}}, {0x1027c0ee0, 0x140000c8750}, 0x14000068c38) /Users/apple/go/pkg/mod/gorm.io/gorm@v1.30.0/migrator/migrator.go:74 +0x130 gorm.io/gorm/migrator.Migrator.CreateTable({{0x8?, 0x1400052ce10?, {0x102c1a848?, 0x140000c41c0?}}}, {0x140003de340?, 0x102702420?, 0x0?}) /Users/apple/go/pkg/mod/gorm.io/gorm@v1.30.0/migrator/migrator.go:218 +0x104 gorm.io/gorm/migrator.Migrator.AutoMigrate({{0x40?, 0x1400064b9e0?, {0x102c1a848?, 0x140000c41c0?}}}, {0x1400049e200?, 0x102702420?, 0x140000c4101?}) /Users/apple/go/pkg/mod/gorm.io/gorm@v1.30.0/migrator/migrator.go:125 +0x17c gorm.io/sharding.ShardingMigrator.AutoMigrate({{0x102c2d1b0, 0x1400064b950}, 0x140004b00d0, {0x102c1a7f0, 0x14000644110}}, {0x1400049e150?, 0x0?, 0x0?}) /Users/apple/go/pkg/mod/gorm.io/sharding@v0.6.0/dialector.go:45 +0x1a4 gorm.io/gorm.(*DB).AutoMigrate(0x1400064ab70?, {0x1400049e150, 0x1, 0x1}) /Users/apple/go/pkg/mod/gorm.io/gorm@v1.30.0/migrator.go:24 +0x44 pay_server/service/pay/internal/svc.NewServiceContext({{{{0x140001c31a0, 0x11}, {{...}, {...}, {...}, {...}, {...}, {...}, 0x0, 0x0, ...}, ...}, ...}, ...}) /Users/apple/go/src/mloss-server/pay_server/service/pay/internal/svc/serviceContext.go:57 +0x370 main.main() /Users/apple/go/src/mloss-server/pay_server/service/pay/payRpc.go:45 +0x204 exit status 2
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: jinzhu
Hi @erdong01
项目的维护主要还是时间问题,等有空我来看下处理一下兼容性吧.
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨