Add db v4 migration.
Merge pull request #615 from mapbox/migrate-db-v4

Add db v4 migration