We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go-gorm/playground#1
..... if err := db.DB.AutoMigrate(&sys.RoleMenu{}); err != nil { log.Errorf("%s", err.Error()) } ......
log
[0.455ms] [rows:0] CREATE TABLE `tb_sys_role_menu__temp` ( "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, `role_id` integer NOT NULL, "menu_id" bigint NOT NULL ) pkg/mod/gorm.io/driver/sqlite@v1.3.2/migrator.go:411 near ")": syntax error [0.011ms] [rows:0] INSERT INTO `tb_sys_role_menu__temp`() SELECT FROM `tb_sys_role_menu` 2022-06-01T09:45:25.751+0800 ERROR models/base.go:54 创建RoleMenu表异常:near ")": syntax error
The text was updated successfully, but these errors were encountered:
如果此处获取的sql 存在"\n 换行符:
@jinzhu 大佬我手动修改数据表的DDL ,则规避掉此issues问题
Sorry, something went wrong.
c86933b
jinzhu
No branches or pull requests
GORM Playground Link
go-gorm/playground#1
Description
log
The text was updated successfully, but these errors were encountered: