Emma has created the tournament database schema using the following models:
type Team struct { // Model of the `teams` table
gorm.Model
Name string
}
type Player struct { // Model of the `players` table
gorm.Model
FirstName string
LastName string
Age int
TeamID uint
}
type Game struct { // Model of the `games` table
gorm.Model
TeamID uint
HomeTeam Team
HomeTeamID uint
HomeTeamScore uint
AwayTeam Team
AwayTeamID uint
AwayTeamScore uint
Date time.Time
}
Now Emma wants to run two single migrations using the db.Migrator() interface to propagate the following changes:
- Change the name of the
gamestable tomatches; - Remove the
agecolumn in theplayerstable.
Your task is to help Emma select from below the two (2) correct code lines required to achieve the objectives above.