diff options
Diffstat (limited to 'src/db/PhotoTable.vala')
| -rw-r--r-- | src/db/PhotoTable.vala | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala index 420b209..d74cbd1 100644 --- a/src/db/PhotoTable.vala +++ b/src/db/PhotoTable.vala @@ -1123,6 +1123,13 @@ public class PhotoTable : DatabaseTable {              throw_error("PhotoTable.upgrade_for_unset_timestamp", res);          }      } + +    public static void clean_comments() throws DatabaseError { +        var result = db.exec("UPDATE PhotoTable SET comment = regexp_replace('^charset=\\w+\\s*', comment, '') WHERE comment like 'charset=%'"); +        if (result != Sqlite.OK) { +            throw_error("Cleaning comments from charset", result); +        } +    }  } | 
