ADD: added team management
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
|
||||
"volleyball/internal/player"
|
||||
"volleyball/internal/team"
|
||||
|
||||
_ "github.com/lib/pq" // Import the PostgreSQL driver
|
||||
)
|
||||
@@ -54,6 +55,8 @@ func CheckIfTablesExist(db *sql.DB) (bool, error) {
|
||||
func InitTables(d *sql.DB) error {
|
||||
CreateOrUpdateTablePG(d, "users", player.User{})
|
||||
CreateOrUpdateTablePG(d, "roles", player.Roles{})
|
||||
createTable(d, "teams", team.Team{})
|
||||
createTable(d, "teams_player", team.TeamPlayerAssociation{})
|
||||
|
||||
tables := []string{
|
||||
// player.PlayerTable,
|
||||
|
||||
Reference in New Issue
Block a user