finish database migration