[TASK] Migrate database and clear cache in switch stage