fix gallery migrations