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

sqlite test (1.19 in ubuntu:latest) : table xxx has more than one primary key #6628

Closed
zhtiyissr opened this issue Oct 8, 2023 · 16 comments
Closed
Assignees
Labels
type:missing reproduction steps missing reproduction steps

Comments

@zhtiyissr
Copy link

zhtiyissr commented Oct 8, 2023

GORM PR Link

#6627

Description

i want to make PR to add some config for migrator, it has only minimal code changes. But the checks failed, here is details: https://github.com/go-gorm/gorm/actions/runs/6448509357/job/17505845740?pr=6627

I don't think this is caused by me, because when I comment out my changes, the problem still occurs.
here is the other test details: https://github.com/go-gorm/gorm/actions/runs/6448558597/job/17505952191?pr=6627

who can fix it?

@github-actions github-actions bot added the type:missing reproduction steps missing reproduction steps label Oct 8, 2023
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

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.ioSearch Before Asking

@mykbas
Copy link

mykbas commented Oct 8, 2023

It seems that there is a problem with v1.5.4 of gorm.io/driver/sqlite.
I suppose after these changes go-gorm/sqlite@139bd30

Try gorm.io/driver/sqlite v1.5.3 or github.com/glebarez/sqlite - both worked well.

@github-actions
Copy link

github-actions bot commented Oct 8, 2023

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.ioSearch Before Asking

@zhtiyissr
Copy link
Author

@mykbas
the test file use gorm.io/driver/sqlite v1.5.3, the problem still occurs.

see https://github.com/go-gorm/gorm/blob/master/tests/go.mod line11

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

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.ioSearch Before Asking

@JacksonRGB
Copy link

same, v1.5.3 run ok

@zhtiyissr
Copy link
Author

same, v1.5.3 run ok

@minchenzz look my PR file changed, i changed nothing, but test failed. hhhhh...

https://github.com/go-gorm/gorm/pull/6627/files

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

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.ioSearch Before Asking

@sluedecke
Copy link

sluedecke commented Oct 10, 2023

Error disappears after downgrading to gorm.io/driver/sqlite v1.5.3.

go.mod now has:

	gorm.io/driver/sqlite v1.5.3
	gorm.io/gorm v1.25.4

@saltyfishyu
Copy link

测试在这个版本时未报错

gorm.io/driver/sqlite v1.5.4
gorm.io/gorm v1.25.3

gorm.io/gorm v1.25.4 出现报错

@github-actions
Copy link

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.ioSearch Before Asking

@jinzhu
Copy link
Member

jinzhu commented Oct 10, 2023

how about gorm v1.25.5?

@zhtiyissr
Copy link
Author

zhtiyissr commented Oct 10, 2023

how about gorm v1.25.5?

@jinzhu use gorm v1.25.5, mysql, mariadb, tidb all have other problems.

@zhtiyissr
Copy link
Author

测试在这个版本时未报错

gorm.io/driver/sqlite v1.5.4
gorm.io/gorm v1.25.3

gorm.io/gorm v1.25.4 出现报错

@saltyfishyu you are right, but when i use gorm v1.25.3, mysql, mariadb have other problems. sqllite is ok.

#6627

@github-actions
Copy link

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.ioSearch Before Asking

@zhtiyissr
Copy link
Author

The conclusion is when you only use sqlite , using gorm.io/driver/sqlite v1.5.3 or gorm.io/gorm v1.25.3 may solve the problem.

But I think there are unstable test cases in https://github.com/go-gorm/gorm/tree/master/tests. Because my PR changed nothing, but the test failed. Moreover, the test results are different at different times. Now I do not encounter the problem of sqlite test failure, but mysql, tidb, mariadb test failure.

Even if I use the same version number in the current master branch https://github.com/go-gorm/gorm/tree/master/tests/go.mod, the test still failed. I don’t know how other PRs are merged. Hope someone can fix these issues.

@zhtiyissr zhtiyissr changed the title sqllite test (1.19 in ubuntu:latest) : table xxx has more than one primary key sqlite test (1.19 in ubuntu:latest) : table xxx has more than one primary key Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:missing reproduction steps missing reproduction steps
Projects
None yet
Development

No branches or pull requests

6 participants