summaryrefslogtreecommitdiff
path: root/api/database
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2025-04-08 12:13:50 +0200
committerSanto Cariotti <santo@dcariotti.me>2025-04-08 12:13:50 +0200
commitc5b10e28b358308d8349b940af09f64368172f2e (patch)
tree47a79c82c04ea7604c03ff128c3b096876f5c9eb /api/database
parentf75ec8f8f5b3d0d75f752b26df1088e9d42d2634 (diff)
Remove relay package
Diffstat (limited to 'api/database')
-rw-r--r--api/database/database.go2
-rw-r--r--api/database/models.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/api/database/database.go b/api/database/database.go
index 0ba40aa..4470c58 100644
--- a/api/database/database.go
+++ b/api/database/database.go
@@ -17,7 +17,7 @@ func InitDb(dsn string) (*gorm.DB, error) {
db, err = gorm.Open(postgres.Open(dsn), &gorm.Config{})
if err == nil {
- db.AutoMigrate(&User{}, &Play{})
+ db.AutoMigrate(&User{}, &Game{})
}
return db, err
diff --git a/api/database/models.go b/api/database/models.go
index 900c7b3..a6e76c5 100644
--- a/api/database/models.go
+++ b/api/database/models.go
@@ -10,7 +10,7 @@ type User struct {
UpdatedAt time.Time `json:"updated_at"`
}
-type Play struct {
+type Game struct {
ID int `json:"id"`
Player1ID int `json:"-"`
Player1 User `gorm:"foreignKey:Player1ID" json:"player1"`