remove foreign keys to be able to delete study data update studies add foreign keys and constrains run study searches update calculated values run sanity checks take snapshot refresh public db create flat files send report email