migrate photos table