storage: improve migration script
storage: improve migration script

DrXyzzy/smc,DrXyzzy/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,tscholl2/smc