Fixed database migrations