Closed balejk closed 10 months ago
Is there a way to force cache regeneration? As it is now, this causes "column does not exist" error after update.
Just delete the cache and it'll be regenerated.
If you bump Cache.SCHEMA_VERSION
, todoman will recognise all caches as old and regenerate them automatically. You should increase the SCHEMA_VERSION
to 10
for this PR so the cache is regenerated seamlessly for users when upgrading.
Just to be sure:
Д
is uppercase, right? I definitely want to keep an uppercase Cyrillic letter in tests.
I believe it is.
Just delete the cache and it'll be regenerated.
Yes, of course, I meant for production.
If you bump
Cache.SCHEMA_VERSION
, todoman will recognise all caches as old and regenerate them automatically. You should increase theSCHEMA_VERSION
to10
for this PR so the cache is regenerated seamlessly for users when upgrading.
I will push this in a second.
Just to be sure:
Д
is uppercase, right? I definitely want to keep an uppercase Cyrillic letter in tests.
But actually, I think you rather want to make sure there is such a lowercase letter, no?
But actually, I think you rather want to make sure there is such a lowercase letter, no?
I wanted to make sure that we have both lowercase AND uppercase in tests.
Thanks!
@balejk You didn't add yourself to AUTHORS.rst
.
@WhyNotHugo I see, sorry. Feel free to add me if it's required (or I can open another PR, but that seems needlessly complicated).
To make category filtering case insensitive, todoman converts the category provided on the commandline to uppercase, uses the sqlite
upper
function to convert the cache entries and then compares the converted strings.However the sqlite
upper
function only works for ASCII strings causing problems when the category is for instanceý
, which sqlite translates to uppercase asý
while the correct version isÝ
, causing the filtering for this category not to return any tasks.Add a new column (
category_upper
) to thecategories
table with the uppercase version of the category name converted by Python (which performs the conversion correctly) and use this for filtering while keeping the original version in thecategory
column as before.Add a corresponding test.
Fixes #540.