move db init to post