modified to init db in cloudfoundry