deploy database properly