The database currently raises exceptions in instances where it would be possible to add new users to the database with default values of 0 for score and tokens. Instead of raising an exception, the database should be updated to allow inserting new users instead of raising an exception.
An example SQL query to be tested:
UPDATE OR REPLACE users SET
username=[username],
tokens=[pre-calculated tokens+amount],
score=[pre-calculated tokens+amount]
WHERE username=[username]
A few examples where this could be used:
add_tokens
set_tokens
remove_tokensuser
add_score
Tests would need to be added and updated to show this feature working correctly.
The database currently raises exceptions in instances where it would be possible to add new users to the database with default values of 0 for score and tokens. Instead of raising an exception, the database should be updated to allow inserting new users instead of raising an exception.
An example SQL query to be tested:
A few examples where this could be used:
Tests would need to be added and updated to show this feature working correctly.