Add database creation on create entity function