write overall state while applying migrations