add hook to create database if it does not exist