Themes archive

Cherry picked commits from `archive` branch

:exclamation: need to run 
```
ALTER TABLE Issues ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE NOT NULL;
```
on the `media_felix_archive` database. 

TODO:

* [x] Make all queries safesql
* [x] Make search work