Fix database migrations