automated DB schema upgrade/downgrade

Bug: 682030
Change-Id: Ic90e460c9739c0723abd2e6f876683d9a49ecdae