Remove use of locals() in db migrations.

This isn't logging usage, but I still feel that something more
explicit is safer. Let's not try to be too clever.

Change-Id: I40633283dbdced6d69eb78e22a04eeb6957c0841
Merge "Remove use of locals() in db migrations."