made database migration tool generic