Description
在v1.22.4报错:gorm.io/driver/sqlite@v1.1.4/migrator.go:108 sql: converting argument $1 type: unsupported type clause.Expr, a struct 降到v1.22.3正常的
CREATE TABLE `tb_sys_menu` (
"id" integer primary key autoincrement,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`created_by` integer NOT NULL DEFAULT 0,
`updated_by` integer NOT NULL DEFAULT 0,
`status` tinyint(1) NOT NULL,"memo" varchar(64),
`parent_id` integer NOT NULL,
"url" varchar(72),
`name` text NOT NULL,
`sequence` integer NOT NULL,
`menu_type` tinyint(1) NOT NULL,
`code` text NOT NULL,
"icon" varchar(32),
"operate_type" varchar(32) NOT NULL
)
执行AutoMigrate动作:
在执行"INSERT INTO tb_sys_menu__temp ...."时
使用了并不需要的clause.Expr Vars 导致出错
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 2 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: ghost
提了一个可以复现的demo 放在 https://github.com/go-gorm/playground 吧~
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 2 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: unknwon
~~For anyone who comes here, update github.com/go-gorm/sqlite to 1.3.2 fixed this.~~ No did not.