Skip to content
New issue

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

postgre 迁移报错 #666

Open
zcyc opened this issue Jun 27, 2022 · 3 comments
Open

postgre 迁移报错 #666

zcyc opened this issue Jun 27, 2022 · 3 comments
Labels

Comments

@zcyc
Copy link

zcyc commented Jun 27, 2022

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
image

Desktop (please complete the following information):

  • OS: macOS 12.4
  • Project Version: lastest
  • Go Version: 1.18
@zcyc
Copy link
Author

zcyc commented Jun 27, 2022

same to #643
@wenjianzhang

@zcyc
Copy link
Author

zcyc commented Jun 28, 2022

试了 #597 的方法,还是报错。

@wenjianzhang
Copy link
Member

应该是字段问题,如果是pgsql的话尝试把sys_migration中 version修改为string 类型 试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants