core: refactor database creation on site init.