go-admin
go-admin copied to clipboard
postgre 迁移报错
Describe the bug postgre 无法完成迁移
To Reproduce
./go-admin migrate -c config/settings.dev.yml
Expected behavior
[20.893ms] [rows:0] CREATE TABLE "sys_migration" ("version" text,"apply_time" timestamptz,PRIMARY KEY ("version"))
2022-06-28 00:26:32.958+0800 file:[email protected]/callbacks.go:133 level:trace /Users/ccc/Work/go/go-admin/cmd/migrate/migration/init.go:49 cannot convert 1599190683659 to Text [0.921ms] [rows:0] SELECT count(*) FROM "sys_migration" WHERE version = 1599190683659
2022/06/28 00:26:32 cannot convert 1599190683659 to Text
Screenshots
Desktop (please complete the following information):
- OS: macOS 12.4
- Project Version: lastest
- Go Version: 1.18
same to #643 @wenjianzhang
试了 #597 的方法,还是报错。
应该是字段问题,如果是pgsql的话尝试把sys_migration中 version修改为string 类型 试试