Manipulating the system database to reset the favicon logo

LabKey Support Forum (Inactive)
Manipulating the system database to reset the favicon logo Leo Dashevskiy  2016-07-29 11:15
Status: Closed
 
Hello there!

We have a testing server that periodically gets to become an identical copy data-wise of the production server with a few visual tweaks to differentiate it from production.

We have a SQL script that does the latter. One thing we still have to do "by hand" is resetting the favicon icon from a custom one to default, and so I was wondering, what SQL needs to be run to do so programmatically.

Thanks.
-Leo
 
 
adam responded:  2016-07-29 12:37
The look & feel resources (logo, favicon, and stylesheet) are stored in core.Documents. If you want to delete ALL custom favicons at both the site level and all projects, you could execute SQL like this:

    DELETE FROM core.Documents WHERE DocumentName = 'labkey-favicon.ico'

If you only want to delete the favicon at the site-level or on a specific project you'll need to add an appropriate condition on Container.

Note that these resources are cached aggressively, so you'll need to restart your server to see the changes. Similar queries should work for clearing logos (DocumentName = 'labkey-logo') and stylesheets (DocumentName = 'labkey-stylesheet.css'), if needed.

Adam
 
Leo Dashevskiy responded:  2016-07-29 15:10
Thanks, Adam! Seems to work (with a reboot).

-Leo

P.S. in our case the logo's DocumentName is 'labkey-logo.png'