russellcain / gockey

go fantasy project
0 stars 0 forks source link

Move all DB static values (i.e. `status`) to shared constants #14

Open russellcain opened 3 months ago

russellcain commented 3 months ago

Currently inserting loose string value "active"; Everything is fine now, but I don't want to make a typo and create a data issue

russellcain commented 3 months ago

honestly, also applies to the table names. This stresses me out: res, err := curs.db.Exec("INSERT INTO ref_table (league_id, team_id, player_id, status)VALUES(?,?,?,?)", league_id, team_id, player_id, "active")