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

WIP refactor!: gorm V2 #644

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

remyoster
Copy link

@remyoster remyoster commented Mar 11, 2021

No description provided.

rules.mk Outdated Show resolved Hide resolved
@moul
Copy link
Member

moul commented Mar 11, 2021

except for the few comments, it looks very good!

@remyoster remyoster force-pushed the dev/roster/gorm_v2 branch 3 times, most recently from 9f7081f to 501c021 Compare March 12, 2021 13:25
go/cmd/pathwar/api.go Outdated Show resolved Hide resolved
Comment on lines +189 to +193
// belongs to
int64 user_id = 200 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "gorm:\"index\""];
User user = 201 [(gogoproto.moretags) = "gorm:\"foreignKey:UserID;references:ID\""];
// has one
User active_user = 202 [(gogoproto.moretags) = "gorm:\"foreignKey:ActiveTeamMemberID;references:ID\""];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ForeignKey constraint fails here -> need to investigate or
maybe need to rethink the model association and use a enum to mark a team_member as the active one ?

go/pkg/pwdb/db.go Outdated Show resolved Hide resolved
go/cmd/pathwar/api.go Outdated Show resolved Hide resolved
@remyoster remyoster force-pushed the dev/roster/gorm_v2 branch 2 times, most recently from 8ed5714 to 73d0b40 Compare March 31, 2021 09:36
go/pkg/pwapi/api_admin-challenge-redump.go Show resolved Hide resolved
go/pkg/pwdb/errors.go Outdated Show resolved Hide resolved
go/pkg/pwdb/helpers.go Show resolved Hide resolved
@moul moul mentioned this pull request Apr 15, 2021
@Z-a-r-a-k-i Z-a-r-a-k-i mentioned this pull request Apr 25, 2021
@trafico-bot trafico-bot bot added the 🚧 WIP Still work-in-progress, please don't review and don't merge label Jun 27, 2021
@moul-bot moul-bot force-pushed the dev/roster/gorm_v2 branch 2 times, most recently from a35ed7a to baec25f Compare February 4, 2022 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change 🚧 WIP Still work-in-progress, please don't review and don't merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants