When we add or modify database tables, we always need to do it like this: add a new function at the end of the migrations array. Modifying functions in the migrations array does nothing, because the database tracks which functions were already run, and they are only ever run once. So if you already started Chatguessr once, the initialSetup migration will never be called again. This approach lets us do upgrades to the database when we release a new Chatguessr version, we don't have to delete the DB and start over, but we can upgrade the existing one and keep all the data.
When we add or modify database tables, we always need to do it like this: add a new function at the end of the
migrations
array. Modifying functions in themigrations
array does nothing, because the database tracks which functions were already run, and they are only ever run once. So if you already started Chatguessr once, theinitialSetup
migration will never be called again. This approach lets us do upgrades to the database when we release a new Chatguessr version, we don't have to delete the DB and start over, but we can upgrade the existing one and keep all the data.