Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/database/migrations/28_count_minehit.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE scores
DROP COLUMN count_minehit;

ALTER TABLE multiplayer_match_scores
DROP COLUMN count_minehit;
5 changes: 5 additions & 0 deletions cmd/database/migrations/28_count_minehit.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE scores
ADD COLUMN count_minehit INT NOT NULL DEFAULT 0 AFTER count_miss;

ALTER TABLE multiplayer_match_scores
ADD COLUMN count_minehit INT NOT NULL DEFAULT 0 AFTER count_miss;
1 change: 1 addition & 0 deletions db/multiplayer_match_scores.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type MultiplayerMatchScore struct {
CountGood int `gorm:"column:count_good" json:"count_good"`
CountOkay int `gorm:"column:count_okay" json:"count_okay"`
CountMiss int `gorm:"column:count_miss" json:"count_miss"`
CountMineHit int `gorm:"column:count_minehit" json:"count_minehit"`
FullCombo bool `gorm:"column:full_combo" json:"-"`
LivesLeft int `gorm:"column:lives_left" json:"-"`
HasFailed bool `gorm:"column:has_failed" json:"-"`
Expand Down
1 change: 1 addition & 0 deletions db/redis_score.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type RedisScore struct {
CountGood int `json:"count_good"`
CountOkay int `json:"count_okay"`
CountMiss int `json:"count_miss"`
CountMineHit int `json:"count_minehit"`
} `json:"score"`
User struct {
Id int `json:"id"`
Expand Down
1 change: 1 addition & 0 deletions db/scores.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type Score struct {
CountGood int `gorm:"column:count_good" json:"count_good"`
CountOkay int `gorm:"column:count_okay" json:"count_okay"`
CountMiss int `gorm:"column:count_miss" json:"count_miss"`
CountMineHit int `gorm:"column:count_minehit" json:"count_minehit"`
Grade string `gorm:"column:grade" json:"grade"`
ScrollSpeed int `gorm:"column:scroll_speed" json:"scroll_speed"`
TimePlayStart int64 `gorm:"column:time_play_start" json:"-"`
Expand Down
Loading