Update pizza selection from Pizzabakeren
Pizzabakeren has added some new pizzas and modified existing ones, this means that the current votable pizzas in pizzabadger is outdated. To update the pizzas a few important arguments have to be considered:
- Currently all pizzas have a unique number as their primary key (which is not related to the menu number), hence what uniquely identifies a pizza has not been "decided" clearly. This should be decided to be able to consider what is considered an "update" vs creating a new pizza and making the old "inactive".
- All votes are connected to a pizza by primary id, and hence modifying the description, or contents of a pizza, means that all votes, even previously made votes, will refer to the new variant. This "destroys" the historical data by modifying the contents of the pizza that was actually voted for.
I see to main approaches:
- Create new entries for all modified pizzas and make old equivalents "inactive". This will preserve historical data.
- Figure out what constitutes a "new" pizza and only add new entries for those, other pizzas are updated accordingly. E.g. this means that if a pizza had a new ingredient it will be updated and looking at the historical data it will seem like the votes for this pizza included the new ingredient.
See this commit for the diff of pizzas.